wordpress

How to Fix Not Working Permalinks in WordPress

How to Fix Not Working Permalinks in WordPress

Introduction

How to Fix Not Working Permalinks in WordPress

Undoubtedly, WordPress is one of the most user-friendly content management systems out there. However, a slight tweak can sometimes go wrong and make your website or a few permalinks inaccessible. Are your WordPress permalinks not working and gives 404 errors? Well, fret not! We just got it all covered. In this WordPress tutorial, we will show what steps to take in order to fix broken permalinks.

Before we proceed further, it is important to know why WordPress permalinks may break and display the 404 page not found errors.

There are three types of permalinks:

  • Default or Ugly permalinks that look like yourdomain.com/?p=123
  • Pretty permalinks e.g. yourdomain.com/your-post-name
  • Almost Pretty permalinks that look like yourdomain.com/index.php/your-post-name (Note the use of index.php in this case)

How To Fix Broken Permalinks?

Now, we will cover the top 3 most popular solutions to fixing broken permalinks in WordPress.

 1 – Resetting permalinks structure

If you are facing faulty permalinks, the first step you need to follow is to reset your permalinks structure. To do this, follow the following steps:

1. Log in to your WordPress Dashboard.

2. In the left navigation panel, click on Settings > Permalinks.

Settings > Permalinks

3. Remove your standard permalinks settings to an alternative setting. For example, if currently, you have Numeric settings, then change it to Post-name. Do not forget to Save Changes once done.

How to Fix Not Working Permalinks in WordPress

4. Now, change it back to your standard setting (Numeric in this case), and click on Save Changes once again. If you did everything correctly, you will also see a confirmation screen.

How to Fix Not Working Permalinks in WordPress

5. Next, open your website and try to access your previously inaccessible pages and posts.

If everything seems to be alright, you’re done with the fixing of WordPress permalinks. However, if you still get a 404 or Page Not Found error, try to follow the next option.

2 – Check And Fix Problems With Your .htaccess File

In the case the above option is not working for you then the issue relates to the configuration of your .htaccess file.

To check that it is the cause of WordPress broken permalink you have to rename/disable your current file and replace with the default code of WordPress .htaccess file.

To disable/rename the file follow the below steps:

1. login cPanel.

How to Access/Login WHM/cPanel and Webmail

2. In your cPanel, locate to File Manager to access the file.

In your cPanel, locate to File Manager to access the file

3. Go to public_html.htaccess file locates in the same location where /wp-content/ and /wp-includes/ are located.

public_html

4. Click on Rename and Enter the new name in the pop-up to disable the file.

Click on Rename and Enter the new name in the pop-up to disable the file

5. After that Create a new .htaccess file.

6. Copy and Paste the below code in the newly created file and Save it.

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

Reload your posts/pages and check whether the permalinks are working.

Are your WordPress Permalinks still not working? You have to clear your browser cache using the key combination ctrl+F5.

Note: Don’t change your Permalinks because it creates a problem when you redirect your old URL to a new URL, and also dropped your ranking. Please think once about your permalink before launch.

3 – Disabling plugins

A conflict between WordPress plugins may also cause breakage of permalinks. The most reliable solution would be disabling WordPress plugins one by one and performing a permalink reset described in Option 1 of this tutorial. In short, here is what you would need to do:

1. After Log In WordPress Dashboard, Go to your Plugins Section.

2. Click on Checkbox to perform Bulk Deactivate action.

Click on Checkbox to perform Bulk Deactivate action

3. Head on to Permalinks Settings page and reset the settings.

4. Do not forget to Save Changes each time.

5. Try to access the pages.

6. Do this procedure for each plugin one by one.

To speed this process up, we would suggest starting with the plugins that were installed or updated most recently. If you succeed in locating the problematic plugin, try removing and installing it again. In addition, contacting the plugin developers or community could also be a great way to find out why it caused WordPress permalinks to break.

 

Conclusion

How to Fix Not Working Permalinks in WordPress

I hope that you found the solution to your permalink/404 page error problem in this tutorial.

We hope that the above tutorial would have helped you in fixing your broken WordPress permalinks. If you have any questions, tips, or tricks, do not hesitate to share them in the comments below!

About the author

Jamie Vadym

Founder of Error Hat. Expertise in Virtualization, Cloud Computing, Linux/UNIX systems, Programming,Storage systems,HA, Server Clustering e.t.c.

Add Comment

Click here to post a comment