You are currently viewing How to Fix WordPress Page or Posts Returning 404 Error

How to Fix WordPress Page or Posts Returning 404 Error

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments

Permanently Fix 404 Error: WordPress is the most content management system in the whole world, But sometimes it facing some problems. 404 post or page returning problem is one of the problems from this.

Anyone can solve the 404 returning problems with few steps.

Most of the time 404 returning problem is create for edited .htaccess file from your CPanel. If you set default .htaccess then this problem is set automatically.

In this tutorial, we solve 404 returning errors within 5 minutes. So let’s get started:

What Is returning 404 Error in WordPress

404 error is a common issue in a WordPress website. This error popups when the command page isn’t found. In an easy way to say that, the browser can’t find the page because they don’t exist.
If a page doesn’t exist, then your browser returns a 404 error. In some cases, you know that why it happens.
There’re few causes for creating a 404 returning error:

Browser caching issues
An incorrect domain name or DNS server.
Compatibility issues with theme design and plugins
Incorrect server configuration

If this will happen with your website, then you sure that a 404 returning error will happen.

There're 3 ways to fix 404 Error in WordPress

If you want to edit your WordPress File, you need a text editor like TextEdit, atom, Notepad, Notepad++, Visual Studio Code, etc.

We also recommended that before edit your file backup your full side.
The first method takes about 30 minutes to solve.

(a) Reset your Permalink

set a permalink for wordpress website

A WordPress user can choose a permalink from multiple. You can change the permalink as a permanent link address. Permalink is your website page or post link.

If you change your website permalink then a 404 error problem will happen. It’s not a permanent problem. If you set your previous permalink then this problem will be solved.
To reset your permalink go to your WP dashboard and click Settings > Permalinks. And Lastly set your previous Permalink.
Hope your problem will be solved.

(b) Restore your .htaccess File

.htaccess file for 404 error

Sometimes this problem will be created for the .htaccess file. If any courses your website .htaccess file was changed then your site show 404 returning an error.

For solving the .htaccess error, Firstly needed to enter your cPanel. To enter your cPanel type yourdomain.com/cpanel then show the Cpanel login window. After opening the Cpanel window then enter your Cpanel username and password, if you forget the username and pass then contact your hosting provider.

After successful login, your Cpanel then searches for File Manager then enter. Then search for public_html and enter. Then search for your domain from public_html. In your domain, you can find the .htaccess file. Right-click on the .htaccess file and click the edit button. After opening the edit option firstly delete everything from your .htaccess file and pest this all code:

# 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]
</IfModule>
# END WordPress

(c) Enable And Disable All Your Themes and Plugins

Disable and enable plugin

Sometimes 404 returning errors will happen for crash plugins. If any plugin not working correctly then this problem happens.
There is two way to solve this problem. Firstly go to your WP dashboard and click plugin > Install plugins. Then select one plugin and then deactivate this. Then check all plugins one by one.
I hope you can solve your problem.

Leave a Reply