“Page not found” error after changing permalink WordPress

Feb 12

Facing “page not found” error that appears when changing to “Pretty” Permalinks in WordPress is very common. Actually I faced this error almost in each time I decide changing the Permalinks. It always takes lot of time and effort from me to fix it, so I decided to stop this continuos pain and write this post listing the possible problems and their fixes for you guys.

There are two assumptions when writing this post:

  1. You are on Ubuntu server
  2. If this is not the case you will have to find the command for your OS that do what I’m doing here.

  3. You are using Apache server

Now the next time you face Page not found issue follow this simple checklist :

  1. Does .htaccess file exists?

  2. Whenever you change the Permalinks, WordPress should update the .htaccess file for you. Sometimes if the file is not created WordPress won’t create it automatically. This is simply because it may not have the permission to do that. So if you can’t find the file in the root of the WordPress installation (After showing the hidden files) create it yourself.

  3. Is the .htaccess file editable?

  4. If the file is there, check the modification time of the file. Then change the Permalink settings from WordPress hit save and go back to check the time again. If it’s not updated then WordPress doesn’t have the permission to update it. To update it you can do one of the following:

    • Change the permission of your .htaccess to 777 (or whatever works in your server), and set the Pemalink again. Once the WordPress added the required code in .htaccess, change back the permission of .htaccess to 644.
    • Add the following code to your .htaccess file manually:

  5. Is Rewrite module enabled in your server?

  6. If you are in a shared server, simply ask the technical supports whether this module is enabled. If you are on your server try running this command in your terminal :

    if you get “Module rewrite already enabled” then move to the next step or else restart your apache server using :

  7. Does Apache knows about .htaccess file?

  8. Open apache2.conf file (normally you will find it in /etc/apache2) and make sure that this line is there:

  9. Search for the “AllowOverride” option

  10. Try searching for “AllowOverride” in these files:

    • /etc/apache2/apache2.conf
    • /etc/apache2/httpd.conf
    • /etc/apache2/sites-enabled/000-default
    • /etc/apache2/sites-available/yourdomain.com

    if you found it in this form :

    just comment it by adding # in front of it. Then restart Apache and check if the Permalinks start working.

  11. Make sure that the Permalinks custom setting is correct

  12. If you are using Permalinks custom settings make sure that /index.php/ is not written in front of your Permalink.

  13. Make sure that there is no “index.html” in your WordPress base directory

  14. Just list the files in base directory of WordPress and make sure

  15. Does your server allow the symlinks?

  16. Try adding the following code to the top of your .htaccess file :

This was my checklist that I used when trying to fix this issue. If all these steps didn’t help you then the problem is definitely is not in your server. Make sure it’s not a theme or a plugin problem. Try disabling all your plugins and changing your theme.

if you have any more items to add to this checklist please tell me and I will be happy to add them.

I really hope this post will save your time.

8 comments

  1. i have to thank you to benefit me with such a good text.

  2. What is a great great well written post. I have been search for quite a while and this is the only one that solved my problem

  3. Daliana /

    Muy contenta con este artículo, muchas gracias por compartir tu conocimiento. Me pase un día entero buscando arreglar este problema y aquí estaba la solución. Muy agradecida. Miles de estrellas para ti.

  4. Thanks!! this helped me a lot 🙂

  5. You’re welcome.

Trackbacks/Pingbacks

  1. Wordpress Tuning and Optimization | Nazaraf's Notes - [...] I encountered error wherein only the the homepage can be seen by other pages and links have 404/Page is…
  2. Modifier les permaliens dans wordpress | Mon Espace | Un ramassis des différentes facettes de ma vie - […] http://www.felfelworld.com/2013/02/12/page-not-found-permalink-wordpress/ […]
  3. WordPress it’s time to understand you better | YHC - […] http://www.felfelworld.com/2013/02/12/page-not-found-permalink-wordpress/ […]
  4. H6: Linux palvelimena ict4tn003-9 ja -10 syksyllä 2013 | Raimo Ainla - […] sen vihdoin toimimaan, kun (ohjeet : http://www.felfelworld.com/2013/02/12/page-not-found-permalink-wordpress/) poistetiin “AllowOverride none”  seuraavista […]
  5. WordPress Permlinks 404 Not FoundCopyQuery CopyQuery | Question & Answer Tool for your Technical Queries,CopyQuery, ejjuit, query, copyquery, copyquery.com, android doubt, ios question, sql query, sqlite query, nodejsquery, dns query, update query, in - […] I have installed the latest WordPress on my EC2 Ubuntu 13.1 server. Once I have changed the permlinks to…
  6. WP Magnet | Wordpress Permlinks 404 Not Found - […] I have installed the latest WordPress on my EC2 Ubuntu 13.1 server. Once I have changed the permlinks to…
  7. Wordpress Permlinks 404 Not Found - Tech Forum Network - […] I have installed the latest WordPress on my EC2 Ubuntu 13.1 server. Once I have changed the permlinks to…
  8. Page not found error after changing permalink WordPress – Felfel World | Felfel World | Hùng Trang @ Thailand - […] Original Post: http://www.felfelworld.com/2013/02/12/page-not-found-permalink-wordpress/ […]
  9. Wp Permlinks 404 Not Found | CodersDiscuss.com - […] I’ve installed the most recent WordPress on my EC2 Ubuntu 13.1 host. Once I’ve transformed the permlinks to make…

Leave a Reply