How to Fix WordPress Pages Returning 404 Errors?

Provide your ratings to help us improve more

Are you getting a “WordPress page not found” or a “404” error? Do not panic! Discover the solution by reading this blog.

The “Page Not Found” problem is probably one you’ve encountered before. Unfortunately, the day will come when you see the notice on one of your pages if you run any kind of website, WordPress or not.

Fortunately, 404 errors are generally simple to troubleshoot and resolve, just like many other frequent WordPress mistakes. Restoring the permalink structure of your website is typically the answer, and it just takes a few minutes to complete.

What is a 404 Not Found Error?

The server’s inability to locate the requested resource is indicated by the HTTP 404 Not Found result status code. Links that end on a 404 page are frequently referred to as damaged or expired links and are potentially vulnerable to link rot.

A 404 error code does not specify whether a resource is temporarily or permanently unavailable; it merely states that it is missing. Use the 410 (Gone) result if a resource has been permanently deleted instead.

Steps to Find and Fix 404 Not Found Pages

Now that you are aware of the severity of 404 errors, let’s look at how to identify and correct them.

How to find 404 errors

Using website crawlers like Screaming Frog is an excellent approach to detecting 404 error-causing broken links rapidly. If your website contains 500 URLs or fewer, Screaming Frog is likewise free.

Conduct a site audit first.

After that, select Response Codes from the top menu.

Get a list of all the pages that are producing 404 errors by filtering for Client Error 4XX.

However, site crawlers only display broken links, so they can’t provide you with a comprehensive list of 404 errors.

But Google Search Console is where you can discover every 404 error.

Every single 404 error that Googlebot discovers on your website is listed in Google Search Console. Both soft and hard 404 errors are included in this.

Select the Excluded tab under Coverage after logging into the Search Console.

A list of both hard and soft 404 problems, denoted as Not found (404) and Soft 404, will be displayed.

To get a complete list of pages producing 404 errors, click on each.

By selecting Reports & Data and afterwards Crawl Information in Bing Webmaster Tools, you can also see 404 errors there.

Finally, any SEO tool can be used to discover 404 errors.

Navigate to the website audit tab using the left sidebar.

After conducting a site audit, choose Critical Errors.

Then select the Warnings option at the page’s top.

These pages will be listed if any of them produce 404 error codes. To get a complete list of the pages, click on the issue.

How to Fix a WordPress 404 Error (8 Troubleshooting Solutions)

This post will provide a fast workaround for the 404 Not Found error. then let’s get going!

1. Delete all of your cookies and history

Clearing the browser’s cache and cookies should be your first line of defence in troubleshooting. Alternatively, you might try visiting your website in incognito mode.

2. Establish Your Permalink

You can alter your permalink settings by following the instructions below if, aside from your homepage, all of the other WordPress website pages give you a 404 page not found error.

  • Open your WordPress Dashboard and log in.
  • Select Permalinks under Settings.
  • Choose the default options.
  • Select “Save Changes” from the menu.
  • Set the controls to their previous position (the one you selected before Default). If you had a custom structure, put it back.
  • Save Settings by clicking.

Reminder: Copy/paste your custom structure into the Custom Base section if you use one.

This approach may be able to resolve the “WordPress permalinks not working” or “404 not found” errors in WordPress.

If it doesn’t work, you’ll need to make changes to the .htaccess file in your WordPress installation’s main directory (where the main index.php file resides). Incorrectly configured .htaccess files or problems with file permissions are other common causes of 404 errors.

3. Get you .httaccess File Back

All files in your FTP account must be set to visible because .htaccess is a hidden file.

Note: Before making any changes to any documents or pages on your website, a backup should always be made.

The steps are as follows:

  • Use an FTP client to access your server.
  • In the same area as directories like /wp-content/, wp-admin/, and wp-includes/, download the .htaccess file.
  • Any text editor can be used to open the downloaded file.
  • The variant of the code that is best appropriate for your website can be copied and pasted by visiting the WordPress .htaccess support page.
  • The .htaccess file should be saved and uploaded to the live site.

Use the following code, for instance, if you are using Basic WP.

4. Establish a 301 Redirect.

It’s time to convert the old URL to your new URL if you’ve updated the URL of any particular page but haven’t done so yet. You can use a plugin or a .htaccess file to reroute your old post or page.

The following code should be added to yours .htaccess file if you are familiar with it. Modify the URLs with those for your website, don’t forget.

Transform 301 to /oldpage.html https://www.mywebsite.com/newpage.html

You can create a 301 redirect using a plugin if you’d rather do it quickly. The steps are as follows:

  • Get the Redirection Plugin installed.
  • Navigate to a WordPress Dashboard.
  • Select Redirection under Tools.
  • Redirection should be added when the setup is complete.

5. Turning off Plugins/Theme

The 404 error on your WordPress website could be brought on by an out-of-date or improperly coded plugin. You must disable all of your plugins and switch themes to verify this.

Although every WordPress theme has a 404.php file, not every theme also has a template file specifically for 404 errors. If a 404 problem occurs, WordPress uses the 404.php page by default.

You can use an FTP program like FileZilla to access your WordPress files. Change the name of the plugins folder to something such as plugins by going to public html > wp-content.

Return to your browser now and verify that the website is operational. If the issue has been fixed, one of your plugins might be to blame.

Simply rename my plugins folder to plugins and continue to the next troubleshooting step if the issue is still present.

If it’s fixed, rename the myplugins folder to plugins and then follow the instructions below to determine which plugin (or plugins) is/are responsible for the error.

  • Visit the WordPress dashboard.
  • Go to Installed Plugins under Plugins.
  • Check to see if your website is operational by activating each plugin one at a time.
  • You would be able to identify the offending plugin when you receive the 404 error.
  • To fix the issue, either update the plugin or uninstall it.

6. Modify and update the database’s WordPress URL

The below error message could appear on your WordPress.

“This server could not find the requested URL. Please double-check your spelling if you manually input the URL before attempting it.

The steps listed below will help you fix the problem:

  • Navigate to PHPMyAdmin.
  • Go to the name of your database and choose wp-option. As an illustration, blog > wp-option.

For instance, change https://www.abc.com/blog/ to http://localhost/blog in the URL.

7. Resolve Local Servers WordPress 404 Error

Many designers and developers use a local server for staging purposes while installing WordPress on their PCs and laptops. Getting permalink rewrite rules to function is a frequent issue with local server WordPress installations.

Even if you modify the permalinks for posts and pages, eventually the WordPress “404 Not Found” error will appear on the website.

In this case, activate your WAMP, XAMPP, or MAMP installation’s rewrite module. WAMP is what I’m using for this lesson. Locate the WAMP icon on the taskbar by navigating there. Navigate to Apache Apache modules after that.

You can toggle a large list of modules on and off as a result. Locate the “rewrite module” option, then choose it to make sure it is checked.

Then verify whether or not your permalinks are active.

The “WordPress 404 page error” or “WordPress permalinks not working” issue should now be resolved thanks to this tutorial. Have you discovered any alternative solutions to this issue?

Comments are closed.