WordPress permalinks not working

4 Easy Ways to Fix WordPress Permalinks Not Working Errors

WordPress errors can be of different types and varying difficulty. One of these includes permalinks not working in WordPress which resultantly results in 404 Page Not Found error.

In this post, I will run you through the most common causes why your WordPress permalinks may not be working and how to fix this quickly.

What are permalinks and possible reasons for permalinks not working

Permalink refers to the page or post URL. So if your website URL is www.dogfood.com, then the permalink of a page on this site would be www.dogfood.com/nutty-bites/.

Note that the part after your domain name in the permalink is called the slug. So, in the above example, the slug would be nutty-bites.

You can read more about What is a Slug in WordPress?

There could be 4 reasons why your WordPress permalinks are not working:

  1. Your permalinks settings changed
  2. Due to .htaccess file misconfiguration
  3. Problems caused by plugins
  4. Mod_security Apache module error

1. Your permalinks settings changed

One of the most common causes of permalink errors is a change in your permalinks settings. If your permalinks are not working but you can still access your WordPress login page, then go to your WordPress dashboard using the login page.

Step 1: Proceed to Settings > Permalinks in the dashboard. Here you can see different options for setting up your permalinks.

Step 2: Make sure that your preferred permalink structure is selected. Now click the Save Changes button.

WordPress permalink settings

Step 3: If you’re using a caching plugin, then empty the site cache.

Visit any page on your site to check whether the permalinks are working as intended.

If they are, problem solved. If you are still getting a 404 Page Not Found error, it could be

2. Due to .htaccess file misconfiguration

It could be that some changes on your site result in .htacess file misconfiguration. To resolve such errors, do the following:

Step 1: Open the .htacess file either by logging into the cPanel File Manager from your hosting dashboard, or you can access the .htaccess file using your FTP application.

Step 2: Check whether your .htaccess file is writable. If not, set the file permission temporarily to 666.

.htaccess file manager settings

Step 3: Ensure that the following code is present in the file. This code manages the permalinks on your WordPress site.  If not, copy and paste it into your .htacess file and save the changes.

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

Step 4: Restore the permissions of your .htaccess file to 644.

Visit any page on your site to check whether the permalinks are working as intended.

If the permalinks are not working problem persists, it could also be due to plugin related issues.

3. Permalink problems caused by plugins

Often, some plugin that you installed on your website could unintentionally interfere with the permalink settings resulting in 404 errors.

To rule out such a scenario, try the following steps:

Step 1: Disable all your plugins from the Installed Plugins menu in your WordPress dashboard.

Step 2: Clear the site cache.

Step 3: Check whether your permalinks are working correctly.

 Step 4: Activate your plugins individually. If any plugin breaks the permalinks again, disable it.

There could still be another reason why your WordPress permalinks are not working.

4. Mod_security Apache module error

Mod_security is a security module for websites running on Apache servers. It protects the site from malicious activity.

However, if your website runs custom post requests, the mod_security module could interfere with your WordPress functionality and cause 404 errors.

In this case, disable the mod_security module from the cPanel interface. If you are unable to locate the module, ask your web host to disable mod_security.

Once you have disabled the mod_security module, clear your site cache and verify whether your WordPress permalinks are working as intended.

Wrapping up the WordPress permalinks not working problems

We have seen the four most common reasons why your WordPress permalinks are not working and have also gone through the solutions for each of them.

Most likely, one of these four solutions will resolve your 404 errors.

If you found a solution to your permalinks not working error or found a different answer to your 404 errors, then please share it with others in the comments below.

And thanks for reading this WordPress troubleshooting tutorial.

About the Author: Trishan Mehta

Trishan loves to dig into the technical side of WordPress. When not WordPressing, he loves exploring the mountains to get a dose of fresh air and new insights on life. He also shares blogging tips and insights on his blog 1stPositionBlogging.com.

You May Also Like

Leave a Reply

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

Get Our Latest WordPress Tips and Updates