The requested URL was not found on this server WordPress 404 Page “Not Found” Error

WordPress 404 Page “Not Found” Error
The requested url was not found on this server wordpress 404 error

It is common that you to come across the WordPress 404 page 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. “The requested url was not found on this server WordPress”

So, are you facing a WordPress 404 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 slightly lost.

Today, I am going to tell you can easily fix the WordPress 404 page not found on your website. So let’s begin! Table of Contents

  • WordPress 404 Page Error (Except Homepage)
  • WordPress 404 Error After Changing Permalinks
  • Fix WordPress 404 Error (Internet Explorer)
  • Change and Update WordPress URL in the Database
  • Fix WordPress 404 Error on Local Servers
  • How To Make WordPress Website-Easy Tutorial 2020

WordPress 404 Page Error (Except Homepage)

At times, all 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 the Save Changes button
  • Change the settings back to the previous configuration (the one 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 posts 404 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 files 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, and download the .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: https://codex.wordpress.org/htaccess 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.

  1. # BEGIN WordPress
  2. <IfModule mod_rewrite.c>
  3. RewriteEngine On
  4. RewriteBase /
  5. RewriteRule ^index\.php$ – [L]
  6. RewriteCond %{REQUEST_FILENAME} !-f
  7. RewriteCond %{REQUEST_FILENAME} !-d
  8. RewriteRule. /index.php [L]
  9. </IfModule>
  10. # 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. (The requested URL was not found on this server WordPress)

404 error Not Found - The requested url was not found on this server wordpress

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

  1. header(‘HTTP/1.1 200 OK’);

Change and Update WordPress URL in the 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.”

The requested url was not found on this server wordpress - 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 https://www.abc.com/blog/ 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 “404 Not Found” error.

Why speed is crucial for SEO & UX?

These expert tips will show you how to improve the speed of your WordPress Websites. I agree to the Cloudways Terms of Service & Privacy Policy GET EBOOK NOW!

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.

The requested url was not found on this server wordpress - 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 that looks like this:

  1. #LoadModule rewrite_module modules/mod_rewrite.so

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

  1. LoadModule rewrite_module modules/mod_rewrite.so

Conclusion

In conclusion, a WordPress website may show a 404 Page “Not Found” error due to various reasons such as missing pages, misconfigured .htaccess files, file permission-related issues, or problems with the rewrite module. This error may lead to visitors feeling lost on the website. However, fixing the error is relatively easy. Solutions include changing the permalink settings, updating the URL in the database, enabling the rewrite module in the server, and editing the .htaccess file. It is essential to maintain a WordPress website properly to prevent this error from occurring. Once resolved, the website will function smoothly, and visitors will have a seamless experience.

Exit mobile version