WordPress 404

Introduction

It’s common for your website to get a WordPress 404 or “WordPress site permalink not working” error if it’s not properly maintained. But there are times when your website is under maintenance and your visitors will automatically be directed to a 404 error page. Are you experiencing WordPress 404 error or “WordPress page not found” error? Don’t panic! We have a solution for you.

What is a WordPress 404 Error?

A 404 error is an HTTP response code that occurs when the server cannot find the file or page the user requested. In response, the web hosting server automatically sends an error message to the user, “404 Not Found”. The WordPress 404 error commonly occurs when: 1-You have moved your site to a new host. 2-You changed the permalink structure of your URL and did not redirect the old URL 3-You do not have file permissions. 4-You have opened an incorrect URL. 5-Poorly coded plugin/theme. Many WordPress themes offer creative layout and content options to display 404 error pages. Cloudways’ 404 error also has a custom design and layout

How to Fix 404 Error on WordPress:

1. Clear browser history and cookies: The first troubleshooting method you should try is clearing the browser cache and cookies. Or you can try viewing your site in incognito mode.

2- Set Up Your Permalink:If other than your homepage, your other WordPress website pages are giving you a 404 page not found error, you can update your permalink settings by following the steps below. Log in to your WordPress Dashboard. Go to Settings → Permalinks. Select the Default settings. Click the Save Changes button. Change the settings to the previous configuration (the one you selected before Default). Put the custom structure back if you had one. Click Save Settings.

3-Restore Your .httaccess File:-Since .htaccess is a hidden file, you must set all files visible on your FTP. Note: It is recommended to backup your site before editing any files or pages. Follow the steps below: Log in to your server using an FTP client. Download the .htaccess file which is located in the same location as folders like /wp-content/ wp-admin /wp-includes/.

Open the downloaded file in any text editor. Visit the WordPress .htaccess support page 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.

4-Setup a 301 Redirect:-

If you’ve changed the URL of a particular page and haven’t redirected it yet, it’s time to redirect the old URL to your new URL. You can redirect your old post/page via a plugin or an .htaccess file. If you are comfortable working with .htaccess, add the following code to your .htaccess file. Be sure to replace the URLs with your own website. If you prefer the easy way, you may use a plugin to set up a 301 redirect. Follow the steps below: Install the Redirection Plugin. Go to the WordPress Dashboard. Click Tools > Redirection. Complete the setup and Add new redirection.

5-. Disabling Plugins/Theme: An outdated or poorly coded plugin can cause 404 errors on your WordPress site. To test this, you must disable all your plugins and change your current theme Note: All WordPress themes have a 404.php file but not necessarily a custom 404 error template file. WordPress automatically uses the 404.php page when a 404 error occurs. You can access your WordPress files using an FTP like FileZilla. Go to public_html > wp-content and rename the plugins folder to something like my plugins.

Now go back to your browser to check if the website is working. If the error is resolved, one of your plugins may be the culprit. Note: If this does not resolve, simply rename the my plugins folder to plugins and proceed to the next troubleshooting method.

WordPress 404

Leave a ReplyCancel reply

Exit mobile version