This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Fix WordPress 404 Page “Not Found” Error

December 8, 2021

5 Min Read
wordpress 404

It is common that you come across the WordPress 404 or “WordPress permalinks not working”error on your website if it is not maintained properly. But there are times when your website is under maintenance and your visitors will be automatically directed to a 404 error page.

So, are you facing a WordPress 404 error or “WordPress page not found ” error? Don’t freak out! We have a solution for you.

It usually occurs when a user clicks on a link to a missing page, the WordPress web hosting server will automatically send the user an error message, for example, “404 Not Found”. Your website by default has composed custom error messages that are in plain content. This leaves your visitors a slightly lost.

Today, I am going to tell you how to easily fix the WordPress 404 page not found or WordPress “404 not found” on your website. So let’s begin!

Having the WordPress 404 error?

No reason to get frustrated! Hire a Cloudways Expert to help you resolve the problem.

WordPress 404 Page Error (Except Homepage)

At times, your WordPress website pages give you a 404 page not found error except your homepage. In such a situation, you can follow these steps to resolve the issue.

      • Log in to your WordPress Dashboard
      • Go to Settings → Permalinks
      • Select the Default settings
      • Click Save Changes button
      • Change the settings back to the previous configuration (the once you selected before Default). Put the custom structure back if you had one.
      • Click Save Settings

Note: If you are using a custom structure, then copy/paste it in the Custom Base section.

Setting Permalinks

In certain cases, this solution fixes the WordPress 404 not found or “WordPress permalinks not working” error. However, if it does not work for you, you’ll need to edit the .htaccess file in the main directory (where the main index.php file resides) of your WordPress installation. 404 errors are also usually due to misconfigured .htaccess file or file permission related issues.

.htaccess is a hidden file, so you must set all files as visible in your FTP.

First thing first, Login to your server using FTP, download .htaccess file which is located in the same location where folders like /wp-content/ wp-admin /wp-includes/ are located.

Next, open this file in the text editor of your choice.

Visit the following link: and copy/paste the version of the code that is most suitable for your website. Save the .htaccess file and upload it to the live server.

htaccess file

For example, if you have Basic WP use the code below.

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

Fix WordPress 404 Error (Internet Explorer)

Sometimes, your WordPress website is working fine on different web browsers except for Internet Explorer. This is because IE is ignoring the 404 conditions since the dawn of IE. However, a few weeks back, Microsoft introduced a system update for IE7 & IE8 that can result in stopping the 404 error occurring on your website instantly, even if your website sends valid content back.

Not Found

The solution is simple. You will have to put the code in header.php which is located in your theme folder.

header('HTTP/1.1 200 OK');

Change and Update WordPress URL in Database

Suppose you can see the below error on your WordPress website.

“The requested URL was not found on this server. If you entered the URL manually, please check your spelling and try again.”

404 Page not found

If such a situation occurs, you can go to your PHPMyAdmin, then navigate to your database name and select wp-option, for example, blog → wp-option.

WP-Option Database

Now change the URL like your website URL is replace it to http://localhost/blog.

Database URL

Fix WordPress 404 Error on Local Servers

Many designers and developers install WordPress on their desktops and laptops using a local server for staging purposes. A common problem that most encounters with local server installations of WordPress is that they couldn’t get permalink rewrite rules to work. They try to change the permalinks for posts and pages but eventually the website shows the WordPress “404 Not Found” error.

Fixing Errors is Easier With Cloudways

Try Our managed cloud hosting for a hassle-free experience

In this situation, you need to turn on the rewrite module in your WAMP, XAMPP, or MAMP installation. For the purpose of this tutorial, I am using WAMP. Navigate to the taskbar and find the WAMP icon. After that navigate to Apache → Apache modules.

Apache modules

It will enable a long list of modules that you can toggle on and off. Find the one called “rewrite_module” and click it so that it is checked.

Rewrite Module

Then check out your permalinks again whether they are working fine or not.

Alternative Method

You can also use the alternative method. Navigate to the local server. Find the Apache folder, then go to the “conf” folder. Navigate to httpd.conf file. Search for a line which looks like:

#LoadModule rewrite_module modules/

Just remove the “#” sign. So it looks like this:

LoadModule rewrite_module modules/


I hope you find this guide helpful and that you were able to solve your “WordPress 404 page error” or “WordPress permalinks not working” problem. Have you figured out any other way to get rid of this problem? Please share your solutions with us in the provided comment section below. I am sure, it will be beneficial for others who are facing similar issues.

Q. Why am I getting a 404 error?

WordPress 404 errors usually occur when you have removed certain pages from your website and haven’t redirected them to other pages that are live. Sometimes, WordPress 404 page error can also occur when you have changed a URL of a specific page.

Q. How do I test a 404 error?

There are multiple tools you can use to test WordPress 404 errors one of which is Deadlinkchecker.

Q. How to edit WordPress 404 page?

On your WordPress dashboard, navigate to Appearance > Theme Editor. Find the file named “404.php file” and edit the file yourself or using the help of a WordPress developer.

Q. How to redirect WordPress 404 page?

On your WordPress dashboard, navigate to Tools > Redirection. There you can apply redirection by pasting the broken URL in the source box and the new URL in the Target box.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Beautifully optimized hosting for WordPress and Magento”

Arda Burak [Agency Owner]

Saud Razzak

Saud is the WordPress Community Manager at Cloudways - A Managed WooCommerce Hosting Platform. Saud is responsible for creating buzz, spread knowledge, and educate the people about WordPress in the Community around the globe. In his free time, he likes to play cricket and learn new things on the Internet. You can email him at [email protected]


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!