Fix 404 Error ‘Permalinks Not Working’ in WordPress: Step-By-Step!

Fix 404 Error 'the' in WordPress
Image Source: Wallpaper Flare
https://www.wallpaperflare.com/404-error-file-not-found-file-not-found-404-file-not-found-wallpaper-wouar

Are you seeing a 404 error with ‘Permalinks not working’ in WordPress?

While WordPress is an incredible content management system, it can be highly sensitive to even the slightest tweaks. Making a tiny mistake can cause this sort of error to appear. Thankfully, fixing 404 issues with WordPress is very straightforward.

In the following guide, we’ll show you a range of ways to fix this issue. But first, let’s remind ourselves what a permalink actually is.

Do URLs matter for SEO?
Image Source: Fabio Lanari
Wikipedia – https://en.wikipedia.org/wiki/HTTPS

What Is a Permalink?

A permalink is the full URL (‘Uniform Resource Locator’) that you use for any given post, blog, page or content on your site. It’s a permanent link (hence the name) and is designed to stay unchanged for many years, making it less susceptible to link rot. 

A Permalink is often rendered as simply as possible, meaning it will have a ‘friendly’ URL that people find easy to type and to remember. The structure of a permalink will usually be your domain name (e.g. www.lewtononline.com) followed by the name of the page (e.g. how-to-promote-clickfunnels). The words that come after your domain name, usually separated by dashes, are known as the slug. A user-friendly URL is sometimes referred to as a ‘pretty permalink’ (aww, that’s cute!)

Permalinks are an important part of your site, as search engines such as Google use these URLs to index your site. The type of permalink you pick therefore has a direct impact on the SEO performance of your site. WordPress has extensive options for creating your permalink URLs, and offers suggestions which meet Google Best Practice standards.

What is a 404 Error?

When a 404 error message pops up, it simply means the server can’t find the page that the user requests. This error usually has nothing to do with your server, it just means the requested file (image, page, or post) is missing.

WordPress Page Not Found – But You Know it Exists!

In this scenario, you’re able to access the admin area of WordPress and the main page of your blog, but no actual posts.

Firstly, don’t panic! In the majority of cases, the posts are still available and perfectly safe. The primary cause of this problem is that the .htaccess file was deleted or has become corrupted (WordPress uses the .htaccess file to keep your permalinks looking ‘pretty’, rather than just a stream of letters and numbers).

The quick fix for a corrupted .htaccess file is really simple: from within WordPress, go to Settings » Permalinks, and then simply click on the ‘Save Changes’ button. This will force an update of your permalink settings and flush the rewrite rules. In a lot of cases, this solution fixes WordPress 404 errors.

If that doesn’t work, you may be able to restore an older .htacess version from a backup. If that’s not possible, then you’ll need to re-build the .htacess file from scratch, which is definitely possible but beyond the scope of this post. Our friends at wpcompendium have a guide that shows you how to do this.

Permalinks Not Working in WordPress: Some Likely Causes and Fixes

There are quite a few reasons why permalinks might stop working in WordPress. In this section, we’ll look at a few of the most common, and suggest an easy fix.

Changing a Page on your Site.

This is by far the most frequent case of 404 errors. Let’s suppose you need to change a page on your site, maybe in response to a new product or an updated version of something you already promote. So, you write your new copy, and you change the slug to reflect the new page. The problem here is that your new page has a different URL to the old one, and Google is still looking for the old URL. When Google can’t find it, the user gets a 404 error.

There are two fixes for this, and the first is very simple: don’t change the URL slug! Google likes websites that maintain a consistent structure, and it rewards this with a higher SEO ranking. At the same time, Google also rewards sites that are updated on a regular basis, so it’s in your best interests to update the content, but not the URL.

Permalink
Image Source: Gabrielleo/Wikimedia Commons

Of course, maintaining the same URL for a page is not always possible, and so the next best option is to use redirects. There are three different types of redirect, but the best one to use is the 301 (Moved Permanently) redirect. Google will typically pass between 90% and 99% of link equity (ie ranking power) to a 301 redirected page, so the SEO score of your site won’t take too big a hit if you use a 301 redirect.

There are plenty of redirect plugins that work with WordPress, and a few of them will also monitor for other potential 404 errors. We’ve used the Redirect plugin with great success for just this purpose.

However, there is a slight page load time hit when using any redirect plugin. To avoid this, it’s best to manually edit the .htaccess file, although making even the tiniest mistake can disrupt your entire site. With that warning in mind, manually adding a redirect is one of the more simple edits. You just need to add two lines to the file (preferably at the end), as follows:

  • RewriteEngine On
  • Redirect 301 /old-version-of-your-page/ http://yoursite.com/new-version-of-your page/

Installing New Plugins:

As much as manufacturers try to maintain plugin compatibility, it’s inevitable that some plugins will refuse to work with others. This is especially true if you have two plugins that essentially do the same thing, as they will both try to compete for the same resources. We’ve had this happen to us in the past when we were running two different SEO plugins at the same time: Yoast and SEOPress. In the end, we uninstalled Yoast, and the problem disappeared.

5 Best Yoast Alternatives to improve SEO

Updating Themes:

Surprisingly, updating a WordPress theme can sometimes make unwanted changes to the .htacess file, which has a knock-on effect that might break your permalinks. (This can happen a lot if you use free community-supplied themes, rather than paid themes from a professional design company.) Usually, a quick restore of the .htacess file will solve this problem (by going to Settings » Permalinks and clicking on the ‘Save Changes’ button). However, if this proves ineffective, there may be a bigger problem. Check Google for any known issues with the theme, and ensure you’re using the most updated version. If all else fails, you may need to find a different theme.

WordPress
Image Source: Naji Habib / www.needpix.com/photo/1620908/

Migrating Site or Restoring Back-Up:

Migrating a website to a new server or domain, or restoring your site from an older backup, can also break permalinks. This tends to happen if you’re doing this manually, rather than using automated migration tools that are designed specifically for this task (We’ve previously used the Duplicator plugin, which is excellent and very intuitive.) Some users panic at this stage and go through all their old backups, trying to find one that works. However, this is not recommended, especially as older backups will probably not cater for any newer plugins you may have installed.

What To Do If You’ve Tried Everything

Firstly, don’t panic. (We’ve said this before, but it’s still good advice!) Whatever problem you’re having, there’s a good chance another user has experienced exactly the same problem, and the fix is already known.  Your first step is to check the WordPress User Forum, which is a great resource full of experienced users only too happy to help.

If you really can’t find any other instance of your particular problem, your only recourse is to contact WordPress and raise a support ticket. Unfortunately, it can take some time for a response, but you’ll definitely get the advice and help you need!

WordPress Permalink 404 errors: Moving Forward

Website

Image Source: Jural Min / Needpix – https://www.needpix.com/photo/709994/WordPress permalink 404 errors, and other similar ‘page not found’ errors, are a fact of life. You’ll almost certainly encounter several more as you build up your site and add new content. Moving forward, you should definitely use a tool that can constantly monitor your site structure and report any broken permalinks.

Apart from using WordPress plugins, such as the  Redirection plugin we’ve already mentioned, there are other ways to monitor your site and get advanced warning of 404 errors.

Here are a few options you may wish to consider:

Google Analytics: This is a ‘freemium’ product, but you can set up a free custom report which tracks 404 errors from external links. Coming from Google itself, it’s a tried-and-tested option that works.

Third-Party Audit Tools: A lot of SEO toolkits have a built-in 404 tracker. Although most of these use the same reference points as Google Analytics, the information tends to be presented more clearly and taking action to fix broken links often requires no more than the clicking of one button. We’ve prepared a report on some of the best options, which should give you a good starting point.

Google Search Console: This will let you track 404 errors that have been encountered by Google’s web crawlers. It’s also the option that has the least impact on your site because it requires no third-party plugins or additional scanning. Google’s bots are already crawling your site, so this is a way to take advantage of the data they already provide.

In Conclusion (and Some Very Good Advice!)

So to close, we’d like to leave you with four words of good advice: pick your permalinks wisely! Think long and hard about changing your site structure: if there’s a way you can update your pages without redirects then you should take it!

It’s true that Google punishes sites with a shoddy structure, but it’s also true that your SEO score will be higher if you take the time to monitor for 404 errors and react quickly.

Thank you for your time, and we hope we’ve managed to help you find a solution to your 404 error. If we have, or if you have any further queries, we’d love to hear from you!