WordPress is a commonly used and easily manageable CMS software for websites. But a simple configuration error can end up breaking the website.
404 error usually happens in websites when there is a broken link or missing page in it. A website with broken links would not appeal to the visitors and you’d lose business.
In WordPress, 404 error can show during many scenarios – Trying to login to the WordPress Admin Dashboard, accessing the main page of the site or any other URLs in it.
Today we’ll see what causes WordPress 404 ‘Page not found’ errors and how to fix it.
What causes WordPress 404 errors
Each WordPress site has web address called Permalinks, which are used to link the contents in the site to the main page. These are URLs to the pages and blog posts.
Certain posts or websites may require a different permalink or a change in its default structure. While doing that, there are chances that these settings get corrupted.
In WordPress, the permalinks are managed using a rewrite array. This array can get corrupted due to custom post types or some plugins, leading to 404 errors.
The Permalink setting is usually defined in the .htaccess file of the WordPress site, in the backend. Any corruptions in the .htaccess file can also render site with broken links.
How to fix WordPress 404 error in website URLs
In WordPress, the 404 error pages occur mostly due to the issue with Permalinks.
To fix that, check the Permalinks from WordPress admin ‘Dashboard >> Settings >> Permalinks’ and try to use the default settings.
Simply save the permalink structure using ‘Save Changes’ button and refresh the 404 page. You’ll see the page loading fine without errors.
Another aspect to check is, whether there are any redirects in the .htaccess file that could be causing the 404 error. Also ensure that proper permissions exist for .htaccess file.
For custom settings and rules to work in .htaccess file, manual configuration of the file may be required. Always take backups before making any changes.
How to fix WordPress 404 error in Admin Login page
In WordPress, the parameter “SiteURL” is where you specify the address people have to type in their browser to access the blog.
SiteURL controls the display of the URL in the admin section of your page, main page and are used throughout the WordPress site.
Any errors in this SiteURL setting can also cause 404 error in the WordPress site or the Admin login page.
This setting is usually updated in the Admin Dashboard for the site as seen here:
To fix the 404 error that is caused due to ‘SiteURL‘ setting, you need to update the entry in the WordPress database, if you’re running multi-site installation.
Before updating the database, make sure to take a backup of it. Select the WordPress database from the PhpmyAdmin of your cPanel.
To know the database name, refer the WordPress configuration file ‘wp-config.php’. Inside the database, look for the table ‘wp_options’.
Click on the small ‘Browse‘ icon near the table. Under the field ‘option_name'look for ‘siteurl'.
Click the ‘Edit Field’ icon in that row and enter the URL for the WordPress site in the input box. Save by clicking ‘Go‘.
Edit the ‘home‘ field also with correct URL. Now refresh the WordPress page you’re trying to access, and it will now load fine without the 404 error.
In short..
Today we saw how to fix WordPress 404 errors to minimize downtime and search engine related errors. It is always recommended to keep backups as a precaution.
At Bobcares, our 24/7 engineers monitor and manage the WordPress webservers to avoid any downtime and performs quick trouble-shooting of errors.
If you’d like to know how to manage your WordPress websites without errors or downtime, we’d be happy to talk to you.
0 Comments