Home Blog WordPress Management WordPress Permalinks not working (404): Causes & fixes
Causes and fixes for WordPress permalinks not working

WordPress Permalinks not working (404): Causes & fixes

If you have ever clicked on a website link only to be met with an unwelcome ‘404 not found’ error, you will understand how frustrating it can be. Not only is this a terrible experience for website users, but it can also negatively impact your SEO efforts.  

If you own or manage a WordPress website, there are several quick measures you can take to prevent this. We’ll cover these measures below along with the most common causes and fixes for WordPress permalinks not working.

There are various possible reasons for WordPress permalinks not working. These often result in the dreaded 404 (page not found) error. However, they can also cause other errors, including 500 internal server errors, 403 forbidden errors, redirect errors, and mixed content errors.

Let’s start by listing the main causes followed by some common ways to fix WordPress permalinks.

When it comes to WordPress permalinks not working, there’s a quick process using the standard WordPress settings that can fix the issue. This simply involves resetting your WordPress permalinks – and best of all, it takes less than a minute to complete.

Clicking the save button within the permalink settings is a fast and easy way to reset them. This can sometimes solve the broken permalinks issue you’re facing:

Step 1: Log into the WordPress Dashboard (usually via /wp-admin)

Step 2: Click Settings on the left panel

Step 3: Click Permalinks

Step 4: Click Save while keeping your structure as it is

This process flushes and effectively resets your WordPress permalink structure, potentially fixing permalink issues.

Cause – Problems with your .htaccess file

The .htaccess file is found within the root directory of your WordPress website and can be used to store URL rewrite rules. This file can be modified and updated automatically by plugins, themes, and other processes which make it one of the most common culprits for causing permalink issues and 404 errors. This can happen as a result of incompatibilities, conflicting settings, or even a corrupt file.

Even though you may not have manually modified this file yourself, it is important to remember that plugins can change the .htaccess file without your knowledge, resulting in broken WordPress permalinks.

Fix – Check and replace the .htaccess file

Fortunately, issues with the .htaccess file can be fixed by simply replacing the file with a new one. The following process outlines the steps you can take using an FTP client or any file manager tool, such as the one included within cPanel. There are also file manager plugins with this same functionality in case you want to make the changes directly from the WordPress backend.

Before replacing the file, it is important to understand the contents of your current .htaccess file. These often contain more than just permalink rules and can include additional code added by developers or automatically by plugins. Removing everything can result in the site breaking, so it’s important to work with care.

For this example, we are using the FileZilla FTP client:

Step 1: Enter your hosting details into your FTP client such as FileZilla

Step 2: You should see a file called .htaccess in your root directory. If you can’t see it, it will likely be inside of your public_html folder

Step 3: Right-click on your current .htaccess file and rename it to .htaccess_backup

Step 4: Now create a new file by right-clicking within white space inside the bottom right window of FileZilla and then name the new file .htaccess.

Step 5: Now that you have your brand new .htaccess file, you will need to edit it. Right-click on the newly created .htaccess file from the list and select View/Edit.

Step 6: Paste the following code into your new .htaccess file:

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

Step 7: Now close the file and when prompted, opt to save changes. You will be asked if you want to upload the modified file back to the server. Select Yes.

Congratulations! You now have a brand new .htaccess file that should fix your permalink issues. Remember that the original .htaccess file may have had additional code added by developers and other plugins and now we’ve removed it, this may cause breaking changes.

If you experience breaking changes, it’s important to compare both files and try to re-add parts of the code one at a time until the issue is resolved. It’s suggested that you copy across one section at a time, test that your WordPress site and permalinks are still working, and then move on to the next section.

Cause – Plugins and WordPress core updates

Newly installed plugins and plugin updates are two potential causes of WordPress permalinks not working. 

In the case of plugin updates, this can sometimes be due to a core compatibility issue, or a conflict with another plugin. It’s also possible that WordPress has been updated, resulting in your plugins requiring an update to be compatible with the latest version of WordPress. 

In both instances, it’s important to realize that installed plugins can make changes to the .htaccess file, meaning you may need to follow the steps outlined above.

Fix – Deactivate and test plugins

If you have recently installed or updated a plugin and find that you have broken permalinks, follow the below steps:

Step 1: Backup your website. Ensure you have a complete backup of your website. This includes your database and all your files, so you can easily restore the previous version if necessary. For instructions, read our guide on how to manually backup your WordPress website without a plugin.

Step 2: Check for plugin conflicts. You can deactivate the plugin in question, or if you want to test all plugins, you can do that too by following the below instructions:

  1. Make sure you are signed into the WordPress Dashboard
  2. Select Plugins from the left panel
  3. You can disable a single plugin at a time by clicking Deactivate, or apply changes in bulk by using the Bulk actions menu at the top of the screen

Now that your selected plugins are deactivated, test your permalinks to see if the problem is resolved. 

If not, consider disabling your other plugins one at a time and testing your WordPress permalinks after each has been disabled. 

Hopefully, by this stage, you will have identified the plugin responsible for your broken permalinks. If so, reactivate all other plugins individually and check your permalinks are still working correctly after each activation.

Step 3: Fix or replace the culprit plugin: If the issue began after installing a specific plugin, consider checking the plugin’s support forum as other users might have experienced the same issue. Alternatively, consider rolling back to the previous version using a plugin like WP Rollback or find another plugin that offers the same capabilities. 

Always remember to test each change to see if the broken permalink issue has been resolved. It is also worth considering contacting the plugin developer directly for support to ensure that the issue is fixed for you, and any other users that are facing the same problem.

Cause – WordPress migration and restoring backups

Permalink issues and 404 errors can also occur when migrating WordPress to a new host or server, or restoring a WordPress backup.

You may even find that your homepage works perfectly but all of the other content on your site is inaccessible or missing. This can also include problems with broken images and media after migrating WordPress to a new domain or host.

Fix – Check the site URL and file permissions

When you migrate a WordPress site or restore from a backup, and face issues with permalinks not working, there are a few essential steps to take:

Step 1: Verify the Site URL:

Go to your WordPress Dashboard, and navigate to Settings > General
Check that the WordPress Address (URL) and Site Address (URL) are correct for your new domain or host. Change if necessary and save changes

Step 2: Attempt the fixes covered previously: This ties into our previously mentioned causes regarding compatibility with plugins and the WordPress core. It’s possible that your permalink settings have been changed since the backup, which could lead to broken links and consequently 404 errors. If this is the case, try resetting your permalink structures, followed by replacing the .htaccess file.

Step 3: Check file permissions: Using an FTP client or file manager tool, ensure your file permissions are set correctly. Directories should be 755 or 750, and files should be 644 or 640.

Step 4: Test your site: After making any changes, navigate through your site to ensure all pages load correctly and your broken permalinks are now fixed.

If you have a large website with many pages, identifying permalink issues can be a challenge. This is why it is better to be proactive rather than reactive by regularly checking your website for permalink issues after major changes or updates.

There are several ways you can proactively identify and fix WordPress permalink issues, so let’s take a look at some of the most common and effective methods here.

Carry out manual checks

Carrying out a quick check of your website by testing your internal links and menus can give you a good idea of whether or not there is a problem with your permalinks. Although it’s a simple test, browsing your site is the quickest way to see if you are encountering any 404 errors and broken links.

It is worth remembering that broken links will affect not only the pages on your website but potentially your images and integrated media too.

Review Google search console

Connecting your website to Google Search Console is a great way of keeping on top of broken links and 404 pages. 

Once you are signed in to Google Search Console, you can navigate to the indexing panel to identify any 404 errors and pages that aren’t being indexed by Google.

There are several link checker tools available that can help you keep on top of any broken links. Some of these tools are WordPress plugins such as the Broken Link Checker from WPMU DEV, or Link Whisper.

Here are some of the most frequently asked questions that users have when dealing with WordPress permalinks not working, broken links, and 404 pages.

Can I change my WordPress Permalink after publishing?

Yes, you can easily change your permalinks in WordPress by navigating to Settings > Permalinks via the left options panel, and then choosing your preferred permalink structure. You can even set your permalinks to follow a custom structure.

What is the lifespan of a Permalink?

There is no set duration associated with your permalinks. It is worth noting however that plugins and other factors may impact your permalinks in the future which is why it is important to keep on top of your website’s health and any WordPress core files that have been modified.

Are there any other common causes of 404 Errors in WordPress?

Many different things can cause 404 errors in WordPress and often it’s just a case of a page being deleted or moved. However, more severe 404 issues often happen after a major change such as an update, WordPress theme changes, or website migration. If you have recently updated your website theme and are experiencing permalink issues, you can try disabling your new theme and configuring your permalinks again through the options menu.

How do Permalink changes and 404 Errors impact SEO?

Changes to permalinks can potentially hurt your SEO efforts in several ways. For example:
 
– Broken permalinks can cause issues for search engines trying to crawl and index your other pages
– If the page encounters a broken permalink after ranking well before, it’s likely the page will eventually drop out of the search results if not fixed
– If you have any inbound links that point to a 404 page, this could have a detrimental impact on how Google ranks your content

On the flip side, if you are making changes to your permalink structure to improve the useability of your website, this can have a positive impact on SEO. An example of this is changing a URL slug to something more descriptive.

How can I prevent Permalink issues in the future?

You can keep on top of WordPress permalinks not working by monitoring your website 
through tools such as Google Search Console. 

You can also use logging plugins like our very own WP Activity Log to keep an eye on changes happening on your site. This can help you to detect unwanted changes quickly and also potentially help you identify the cause of an issue when it arrises.  

Conclusion

Fixing WordPress permalinks is essential to maintain your site’s accessibility, usability and SEO standing. 

By walking through the steps outlined in this post, like resetting your permalinks, replacing your .htaccess file and testing your plugin setup, you should have been able to fix your permalink issue.

Any questions after reading this post? – we’d love to hear them!