Popup Image
Popup Image
⚡ 90+ Free Elementor Widgets – Build faster WordPress sites Download Free Plugin →

How to Fix 404 Error in WordPress

Stuck with 404 errors on your WordPress site? 404 error occurs when you are trying to visit “not active” page. If you remove some URLs of your website, but do not redirect them to the right URL, then it leads to 404 error. Changing the URL of the specific web page can also cause this 404 error.

When the Site is under maintenance, and visitors try to browse your site, then it also shows the 404 error on their display.

In this guide, we will tell you about 404 errors, causes, and effective solutions to resolve these errors.

What Is a WordPress 404 Error?

The 404 error is HTTP response code that occurs when a server is unable to find the page or file you are requesting. In response, the server sends the error message, 404 Not Found to your browser.
The WordPress 404 error occurs when:

  • The page never existed on the site.
  • The page was deleted or moved without a redirect.
  • The URL was changed, but users are still trying to access the old link.

For example, if the blog is published at example.com/404-error page and then updated to example.com/404-page, then it shows the 404 error to users if they are trying to visit this page with the original URLs.

So, WordPress 404 errors usually occur when someone tries to access to URL that does not exist. But in rare cases, this error also occurs due to a corrupted .htaccess file.

Types of 404 Error

The 404 Error not found message appears in different forms on based up on browser you use. Here are the forms of this message, such as:

  • Error 404
  • 404 Not Found
  • Not Found
  • Page Not Found
  • The requested URL was not found on this server
  • HTTP Error 404
  • We can’t find the page you’re looking for
  • The page cannot be found

The website owners can also create a custom 404 error page to show this message in a more friendly way to visitors. Some sites include links or search box to help users to find what they are looking for. This method reduces user frustration and enhances site navigation when this error occurs.

Check the given picture to see how the Spexo Addons website includes a custom 404 page with a search box. In this way, they help their users to access the content that they need.

Fix 404 Error in WordPress

It is the default 404 error page for all sites using the Spexo. You can use Spexo Addons to create a custom design according to your website style.
Some websites are also creating custom 404 pages as their branding opportunities, like the example from Spexo Personal Portfolio Elementor Template:

WordPress 404 page not found

Why the 404 Error Occurs?

The 404 errors are caused by several issues. Below, we discuss some common causes for 404 error page:

1. Sitewide 404 Error

If all pages of your site lead to a 404 error, then it is related to WordPress permalink structure or a corrupted .htaccess file. It cause when something affects the method of URLs configuration. It make the server unable to find your page and complete the users request. You can fix this issues easily.

2. 404 Error on Specific Pages

If you see the 404 error on specific pages or URLs of your site, then there are some causes.

  • Broken Links: If the links attached to your page do not exist, then this error occurs. It could be external links and internal links. When users click on those links, it takes them to pages that do not exist and triggers 404 error.
  • Changed URLs: If you change the link of any piece of content, and try to visit that page with the old URL, then this error occurs.
  • Typos: Sometimes, users make the typo mistakes while entering URL, and face the 404 error. Even though you can not prevent typos, but you can create a custom 404 page to make a friendlier experience for users.

Reasons You Should Fix the 404 Error

As we told you, 404 error affects the SEO of your website and frustrates users. So, fixing this issue is important as soon as possible.
Here are the reasons why you should fix this error:

1. Improving User Experience

When users see the 404 error, it disrupts their experience and causes frustration. If users repeatedly see 404 error on your website, then they lose their trust and choose other sources. So, fixing errors is important to keep the user’s trust in your website and engage them for a longer period.

2. Preserving SEO Value

A 404 error can waste the link equity and affect the SEO of your website. Google ranks your website on the basis of these pages or URLs, but if links take users to a missing page, then Google does not consider it and loses its SEO. It is suggested to retain 404 pages to relevant and live URLs, so you get the benefits of both internal and external links.

3. Supporting Search Engine Crawling

Even Google states that the 404 error sometimes does not harm your SEO crawling, but the excessive number of errors can affect your site structure. It makes it tough for Google to crawl your website. So, you should resolve the 404 error by fixing these links or redirecting them so that Google will crawl your website well and make it top of the search engines.

How to Fix 404 Not Found: Step-by-Step Tutorial

Here we give you step by step guide to fix the 404 not found error and enhance the SEO of your website:

1. Clear Browser History & Cookies

  • Why do this? Sometimes, the 404 errors are also caused because of Cached data and cookies stored on your browser. It indicates the outdated version of your page and encounters the 404 error.
  • Steps:
    1. Go to your browser settings.
    2. Next, go into the Privacy & Security section.
    3. Find the Clear Browsing Data option or Clear History or Clear Cache.
    4. Select both Cookies and other site data and Cached images and files.
    5. Tap on Clear Data or Clear History.

How to resolve 404 error in Elementor

These steps clear the cookies and caches, ensure that your browser loads new data from websites, and resolve the 404 error.

2. Set Up Your Permalink

If the 404 errors are encountered on other pages of your website, except the homepage, then there is a problem with the permalink settings. You should adjust permalink settings to fix this error.

  1. Log in to your WordPress Dashboard.
  2. Go to SettingsPermalinks.
  3. Choose Default settings.
  4. Tap on Save Changes button to save changes.
  5. Go back to your previous permalink configuration (if you had a custom structure before).
  6. Click on Save Settings again.

404 error troubleshooting WordPress

This solution can fix the WordPress permalinks not working issue or the WordPress 404 page not found error.

But if you still face this error, then you need to edit the .htaccess file in the main WordPress directory. 404 errors are also caused by file permission-related issues or misconfigured .htaccess files.

3. Restore Your .htaccess File

If you experience the 404 errors because of the .htaccess file, then you should restore the file.
Here are the steps you should follow to resolve this problem:

  1. Use the FTP client and Log in to your server.
  2. Enable the hidden files to be visible by click on option to view hidden files in FTP client.
  3. Move to the root directory of your WordPress installation (typically where you’ll find folders like /wp-content/, /wp-admin/, and /wp-includes/).
  4. Next, you should find .htaccess file to your local computer.
    WordPress broken link fix
  5. Open the downloaded file by using a text editor (like Notepad or TextEdit).
  6. Next, visit the WordPress .htaccess support page  and Copy the Appropriate Code for Website Setup.
    You can use the default WordPress .htaccess code given below to restore the default configuration for permalinks:

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    
  7. Now, Paste the code into the .htaccess file and replace the old content.
  8. Tap on the save button to Save the .htaccess file and upload it to the root directory of your server.

In this way, you can restore the default permalinks settings and fix the 404 errors caused by the corrupted .htaccess file.

4. Disable plugins and themes

Poorly coded or outdated plugins and themes are another cause behind 404 errors. To identify this cause, you should deactivate all plugins and update the current theme.
Here’s how you can easily deactivate all plugins on your WordPress site:

1. Deactivate All Plugins

  1. Use an FTP client like FileZilla and Access your WordPress files.
  2. Go to wp-content and rename the plugins folder with a name like plugins-disabled. It deactivates all plugins.
  3. Now, browse the websites again on your browser and see if this 404 error has been resolved.

Custom 404 error page WordPress

2. If the Error Is Resolved

  1. If the error is resolved, then you should rename the plugins-disabled folder back to plugins.
  2. Go to your WordPress dashboard.
  3. Select Plugins → Installed Plugins.
  4. Reactivate every plugin one by one and check your website after activating each plugin.
  5. When the 404 error occurs, you know the culprit plugin that causes it.
  6. Once you know, remove the problematic plugin and fix this error.

WordPress 404 error solutions

3. If the Error Is Not Resolved

  1. Rename the plugins-disabled folder again to plugins and follow the next troubleshooting step (such as switching the theme).

All WordPress themes include the 404.php file, but it doesn’t always have the 404 error template. If your theme doesn’t have a template, then your site uses the default 404.php template.

How to Create a Custom 404 Error Page

Creating a custom 404 error page is an effective way to reduce the impact of 404 errors on users.

Here are the three effective ways to create a custom 404 error page:

  • Explain the error and why the site content is missing.
  • Include a search box to help users find their specific content or pages.
  • Give links to the most popular pages or content.

Along with the above 3 ways, there are many other ways to create a custom 404 error page effectively. If you want to create user friendly and unique 404 page for your site, then you can check out Site Builder in Spexo Theme. It helps you to create a personalized 404 error page with simple steps, and it will improve the user experience.

FAQs about to Fix 404 Error in WordPress

Typically, a server returns a 404 error if it cannot locate a page or file that a browser is trying to access. This may be due to broken links, deleted pages, or incorrect URLs.

On a WordPress site, this could occur because the URL to a particular page was changed and no redirection was put in place, because of broken links, or because of server issues like a damaged .htaccess file.

You can remedy this type of error by ensuring that the URL is correctly written without any additional spaces, invalid characters, or typos. Furthermore, ensure that if the page has been moved or renamed, the link has been updated.

Identify and rectify all internal and external links. Use a link checker. Ensure that all URLs actually point to an existing page on the site.

The 404 error can be fixed by clearing the browser cache and cookies as they may contain obsolete data regarding pages that have already been deleted or changed.

Problems with the .htaccess file can lead to 404 errors. If this file is corrupted, changing it back to the default will help restore the server settings that were lost.

The 404 page can be personalized in the 404.php file located within the theme or personalized through plugins for easier navigation and a search feature on the page.

Obtaining a 404 error too frequently can damage your site, as search engines may stop indexing your pages. This can reduce your site’s link equity and overall search ranking.

You can do so by routinely scanning for broken links, using 301 links and redirects, and tackling permalinks. Guaranteeing that every URL has a proper link will help preserve your SEO ranking.

Wrapping Up

Hope this guide helps you resolve the WordPress 404 page error. Fixing these errors helps you to maintain a smooth user experience and ensure that your site is SEO friendly for visitors. The above solutions, restoring your .htaccess file, adjusting permalinks, or creating a custom 404 page, help you to overcome this problem and enhance your site performance.

Do you know any other effective solutions to resolve this error? We love to get your tips. Drop your tips and recommendations in the comment box given below.

Nayan Bagia

Nayan Bagia

Nayan Bagia is the founder of SkyWebTech and Fast Themes - TemplatesCoder. He is a Mobile Apps, WordPress and UI/UX specialist with more than 15 years of industry experience. His work has received international recognition, including the A’ Design Award, for innovation in web and interface design. He focuses on combining AI-powered tools with WordPress and Elementor development to build modern, scalable websites. Nayan shares practical guidance on design, performance, automation, and SEO. His content helps developers and business owners create reliable websites that are easy to manage and built for long-term growth. Connect with him on LinkedIn

You may also like