[wordpress tips] Change permalinks

As suggested by several websites I wanted to change my permalinks from the structure p=123 to structure /post-title/ because it should be easier to find my content using a search engine.

First you have to go to you wordpress admin panel.

Then you do the following:

  1. Click on “Settings”
  2. Click on “Permalinks”
  3. Apply the changes you want (I changed the link structure and the base for categories)
  4. Click “Save changes”.
How to change permalinks.
How to change permalinks.

It might be that you need to create redirects for which I found this tool. For my blog the tool said “You don’t have to do any redirects, WordPress will do it for you.”.

But, if wordpress does not have write access to your .htaccess file (A message is generated after you “Save changes” on the top of the “Permalinks” page), you have to add this manually (in my case I just had to uncomment it because the lines were already there):

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

My .htaccess file is located at /etc/wordpress. This might be different depending on the OS of your server but in general you will find it there (make sure to look for hidden files as well).

Now everything should work! To test it, you can do the following:

  • Click on an old link and try if it redirects
  • Click on any category / tag in case you changed the structure for them as well
  • Click on a post in the overview to see if the new links work

Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *