menu
How to fix 404 errors on WordPress
How to fix 404 errors on WordPress
Although it,s the most popular CMS world , there will be times when you'll run into problems while useing wordpress .

How to fix 404 errors on WordPress

Although it's the most popular CMS worldwide, there will be times when you'll run into problems while using WordPress -- one example of a problem is WordPress posts that return with a 404 error.

Luckily, resolving errors 404 in WordPress can be a simple task.

Most of the time they're due to issues in the .htaccess document. When you reconfigure or modify this file, the problem will be solved.

In this guide, we'll take a look at the ways to solve WordPress posts that give 404 errors. Let's get started!

Table of Contents
  1. What Is a 404 Error in WordPress

  2. How to Fix WordPress Posts Returning 404 Error (3 Ways)

  3. Conclusion

What Is a 404 Error in WordPress

The 404 error isn't just a problem for WordPress It can occur on any website. The errors appear when a webpage isn't discovered. In many instances, web browsers are unable to access these pages due to the fact that they're not there.

If your browser gives you a 404 error, indicating that a website isn't there typically, it's just a minor inconvenience. In some instances, it is possible to encounter an error 404 for pages you are sure are present.

In these instances, the most frequent reasons are:

  • Issues with Caching

  • Untrue Domain Name Server (DNS) settings

  • Problems with compatibility are a problem with WordPress theme and plug-ins

  • Troubles with your server's configuration

In this case, if visitors encounter problems with your website that aren't caused by wrong URLs, you'll need to resolve the issue as soon as you can.

How to Fix WordPress Posts Returning 404 Error (3 Ways)

You'll require the FTP (file transfer protocol) client like FileZilla as well as Cyberduck to connect to your server. If you require assistance with creating the FTP connection, you can check out this excellent tutorial by WordPress Support about how to utilize FileZilla in conjunction with WordPress.

For editing your WordPress file, you'll require an editor that can text like Notepad, TextEdit, Atom, and Visual Studio Code, too.

We also suggest that you make a backup copy of your website before beginning troubleshooting.

To begin, let's look at something that will take about 30 minutes.

  1. Reconfigure Your WordPress Permalinks

WordPress gives you multiple options of the permalink structure. Permalink is a term used to describe a permanent link. It's the URL that your website users use to navigate your posts and pages.

In some instances, WordPress might run into issues when creating the permalinks, which can result in errors 404. To resolve this issue it is necessary to temporarily change your website's structure of permalinks. This is only necessary for the event that you're using another URL structure other than that of the plan.

To modify the structure of your URL, log into your WordPress administrator area and navigate there to go to your settings > permalinks page. Note down or record the current settings and then choose the plan option in the common settings:

After saving your modifications and your changes, the page will load. In this case, you can change the structure of your old permalink then save the changes.

While the structure of the permalink was reset just once, it can suffice to make the error 404 disappear. If not then you'll have to look further into WordPress.

  1. Restore Your Default .htaccess File

The .htaccess file includes instructions on how WordPress will interact in conjunction with the server. Within those instructions, are guidelines on how to make your site's URLs.

If changing your website's permalink structure via the dashboard did not resolve the issue The following step would be to restore your .htaccess file to its original format.

In many instances, you will notice that your WordPress plugins or hosting service modify the .htaccess file -Some of which could result in errors on your site. Restoring it to its original state provides you with a new start to build from.

To find the .htaccess file, connect to your site using your FTP client and then open the root folder (usually named "public_html"). Your .htaccess file should be found here. Right-click and select an option called View/Edit. Edit/View option:

Image alt="Editing your htaccess file through FTP." data-ll-status="loaded" src="https://athemes.com/wp-content/uploads/view-edit-htaccess-768x221.png"/>

The file will be opened with your default text editor. Then, delete the contents of the file and replace it with this code:

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

This is the basic content of the standard .htaccess WordPress file. After you've pasted the code into your site's .htaccess file, save your changes, and then close the file.

Your FTP client will ask you to change the files on your server. you should! Then, try accessing your website once more to see whether the 404 error persists.

If the error has gone away If it is not, go to the Settings > Permalinks page on Your WordPress dashboard to modify your permalink structure to the original structure. After this, everything will be working again. If not, you'll have to go on to the next option.

  1. Disable All Your Themes and Plugins

In certain instances, there are compatibility issues between themes, plugins, and WordPress itself may result in 404 errors appearing on your site.

If you've tried all of the earlier methods and failed The next step is deactivating your plugins and themes to see if they are experiencing compatibility issues.

To deactivate your themes and plugins via the dashboard, go to the appropriate screen inside the WordPress administration space (Plugins > Installed Plugins, or themes > Appearance) Choose the plugins or themes that you wish to deactivate, select the option to deactivate under the Bulk actions drop-down menu and then click the Apply button:

Image alt="Disabling plugins from WordPress's dashboard." WordPress Dashboard." data-ll-status="loaded" src="https://athemes.com/wp-content/uploads/deactivate-plugin-768x325.png"/>

This is the most efficient method to turn off all plugins that are on your site. This will likely affect the functionality of your website, however, it is essential to eliminate any plugins as the root cause of the error. If you do not want to carry out this procedure on your live website it is recommended to create a staging website.

If the problem persists after deactivating every plugin it is also necessary to disable the active themes.

If the issue persists, try reactivating all plugins and themes and follow the steps:

  1. The plugins must be deactivated one at a time.

  2. After deactivating a plugin, see if the WordPress 404 error persists.

  3. If the issue persists, restart the plugin and then repeat the process by re-activating the plugin.

This will allow you to determine the plugin that is causing compatibility issues for your site.

If the error 404 prevents the user from accessing his dashboard, you may disable themes and plugins on your site using FTP. To do this connect to your site using an FTP client, go to the root directory, and then navigate to the WordPress-content directory. There are a variety of folders, including two labeled plugins and themes:

Image alt="Accessing to your WordPress Themes folders as well as plugins using FTP." data-ll-status="loaded" src="https://athemes.com/wp-content/uploads/plugins-themes-folders-768x193.png"/>

Each directory contains subfolders for each of the themes and plugins used on your website.

To deactivate plugins in a masse by right-clicking to open the plug-ins folder and change its name to whatever you want, e.g. plugins. old. Create a brand completely new folder for plugins. The folder. It must be empty:

 data-ll-status="loaded" src="https://athemes.com/wp-content/uploads/plugins-disabled-768x206.png"/>

Then try accessing your site once more to see whether the 404 error shows up. If it's not, you can clear the empty folder and alter the name back as the plugins.

Your next step is to block specific plugins. To do this, you must open your plugins directory. Follow the following steps:

  1. Rename the folder of a plugin.

  2. Examine if the 404 error persists on your site.

  3. If so, change the name of the folder to the name it was originally given then repeat using another plugin.

If the error doesn't appear at any time this plugin may be at fault. In this case, you'll need to seek out the developer for an answer, search for a solution that works, or deinstall the plugin.

This procedure works like themes. If you name your active theme's folder WordPress will choose the default theme. After changing the folder's name, test your site and see if the issue is gone. The previous theme is the culprit.

Conclusion

WordPress posts that show 404 errors are a thorny problem. If your visitors are unable to locate the information they're seeking on your site and give up, they may abandon the site and go to a different site. That's why not addressing 404 errors can be a major factor in the bounce rate and conversion rates.

If you're encountering errors with 404s on your WordPress website that isn't caused by improper URLs or issues with caching This is how you resolve the issue:

  1. Modify your WordPress URLs.

  2. You can restore the .htaccess file.

  3. Remove all your WordPress themes as well as plugins.

Are you having any other questions regarding the best way to fix WordPress error 404? Tell us in the comments below!