Common Wordpress Errors
Posted 04th октомври, 2018
As WordPress is the most popular CMS and used by millions of people there are some issues you can encounter while using it.
Error establishing a database connection
This common issue is self explanatory - it means our files are unable to connect to our database. This issue though can be caused by multiple of reasons:
This issue occurs when the details used in our wp-config.php file are incorrect, you will need to validate DB_NAME, DB_USER, DB_PASSWORD
and DB_HOST
variables in the configuration file.
Your database can experience multiple of issues due to many various reasons. To identify if the issue is caused by an issue with the database itself you can easily test if the issue re-occurs in the backend , if the backend functions properly but the front end does not - you might need to get your database repaired or restore a backup.
To repair your WordPress database you can use the the repair function by adding the following line within your wp-config.php file:
define(‘WP_ALLOW_REPAIR’, true);
and going to yoursite/wp-admin/maint/repair.php url and select Repair database option.
You do not have sufficient permissions to access this page
The most common cause of this error is a failed update of the core, however when that happens the database number has already been incremented, so WordPress thinks everything is up to date, but it hasn’t yet written the permissions that you will need to access the WordPress admin interface.
To fix this issue - manually replace the following core directories with freshly downloaded ones from the official WordPress repository:
Redirect loop
This error means that the site isn’t redirecting properly, the first thing to do would be to check the .htaccess for newly added redirects and disable them.
Another thing that could be causing the issue would be not properly set SSL certificate, if there is a redirection to HTTPS and in the home_url
and site_url
are set to load over https a conflict could occur causing the redirection loop.
Another issue could be caused in Checkout pages when there is redirection to HTTPS set generally on the site and the "Force SSL" in the SSL settings in WooCommerce which you can find at WooCommerce >> Settings >> Checkout >> Checkout Options . This will cause a conflict with the existing redirection to HTTPS which will result in the error. Disabling this option will fix the issue.