WordPress: Update permalink from database
Some reason, I am not able to access the admin and server is not supporting SEO friendly urls and I need to make website up and running. So I need to access database and update the table to change the url structure of wordpress so that pages can be access using ids.
Here how you can update the ‘wp_options’ table:
Go to table and run below query:
SELECT * FROM `wp_options` WHERE `option_name` LIKE 'permalink_structure'
If setting is "plain" value will be blank If setting is "Day and name" value will be "/%year%/%monthnum%/%day%/%postname%/" If setting is "Month and name" value will be "/%year%/%monthnum%/%postname%/" If setting is "Numeric" value will be "/archives/%post_id%" If setting is "Post name" value will be "/%postname%/" If setting is "Custom Structure" value will be same as what you added in text field.
Usefull link to create custome structure : Choosing your permalink structure
WordPress version: 4.0.17