WordPress is one of the most recognized web content managers in the world. However, it is possible to encounter errors even while working on the most advanced systems. Especially if you are coding on themes and plugins, it is highly likely to encounter errors due to conflicts. We have prepared a WordPress tutorial with common WordPress errors and solutions for you.
The most common WordPress errors
Our WordPress guide for common errors addresses the following common problems:
White page fault
Maximum file size limit
Temporary folder lost error
WordPress Admin panel login error
500 – 502 – 504 – 505 errors
Max execution time
Error creating database connection
Let’s examine all of them one by one in more detail.
White page fault
If you have been working with WordPress for a long time, you must have faced with a white page error. There are many reasons why you might get this error. Your memory may be full, it may be caused by an extension you have installed, or it may be a problem with your hosting company. Apart from all these reasons, the theme you use may have also left you with this error. To understand which of these reasons causes the error, you need to paste the following code into the wp-config.php file.
error_reporting (E_ALL); ini_set (‘display_errors’, 1);
define (‘WP_DEBUG’, true);
After determining the cause of the error, you should first find solutions for the problem. If the plugins you use caused this problem, you can disable the plugins one by one and identify the plugin that caused this situation and get rid of it. If you have a problem with your theme, you can change it or fix the error in the theme source code. Also, if you are getting memory warnings, you will need to increase the memory limit.
Max upload file size
When uploading your plugins or adding high-sized images, videos, and audio files via the admin panel, “This file you want to upload exceeds the maximum file size defined for the site.” he might get an error. In this case, you will need to increase the maximum file size limit you can upload.
You can solve this problem in two ways:
1 adding the codes to the .htaccess file
After accessing your site files, open the .htaccess file. Paste the following codes into it and save.
php_value upload_max_filesize 64M
Thus, you increase the maximum file size you add to 64MB.
If you need, you can increase it to 128 – 256 MB.
2.with the help of Increase Max Upload File Size plugin
Since every plugin you install will directly affect the performance of your site, I wouldn’t recommend solving every problem using plugins. You can choose Increase Max Upload File Size plugin because it is a method that you can solve the problem directly without dealing with codes and the plugin size is low. To do this, follow the Extensions> Add new steps from your admin panel. Download the “Increase Max Upload File Size” extension from here.
In the Enter Value in Nuber section, write our maximum file limit in bytes. Information on how to convert Byte to Megabyte is also available in the plugin interface.
Temporary folder lost error
Folder lost host error does not allow you to install or update any plugins, images, themes on your site. To do such installations, WordPress needs a temporary folder. If this folder is not defined in your server’s PHP configuration, you will get a temporary folder lost error. To fix the error, you need to create this temporary folder. First, you have to access the files via FTP and edit the wp-config.php file.
define (‘WP_TEMP_DIR’, dirname (FILE). ‘/ wp-content / temp /’);
Paste the code above into wp-config.php file and save. Next, go to the / wp-content / folder and create a new folder called temp. That’s all, your problem has been fixed!
674/5000WordPress admin panel login error
If you are getting the WordPress admin panel cannot login error, that is, if you cannot access the WordPress panel, there may be more than one reason, but don’t panic, they all have a solution.
When password reset doesn’t work, we need to reset the password by either using the database or editing the function.php file.
We must have access to Phpmyadmin on the server so that we can reset the password using the database. Backing up the site before doing all these operations ensures that you always secure our work. Then, log in to the server panel (cPanel etc.) and click on the database area and then on PhpMyAdmin.
Extract the files from .zip after downloading the most suitable version for you. Select all items except the wp-content folder and throw them to your server. Start the file transfer after you authorize the warning in Filezilla to “Overwrite”. In this way, the manual WordPress update process is also completed.
Max execution time error
If you are getting this error on your WordPress site, it means the script will be loaded longer than the time allotted for the PHP script.
To resolve this error, you need to access the .htaccess file and manually edit it. By connecting to the ftp folder, you must add the necessary code to the .htaccess file to increase the script loading time.
php_value max_execution_time 60
When you add this code to the bottom of the file, you have now extended the script execution time to 60 seconds (1 min). If you continue to get errors, you should check again by increasing this time to 120 or 180 seconds.
Error creating database connection
If you are getting this error, your site files are having trouble accessing the database. You will need to check the database connection in a few steps.
We will first try to repair our database. For this, we access our wp-config.php file.
define (‘WP_ALLOW_REPAIR’, true);
After pasting the code above, our database becomes externally repairable. We go to http://www.siteadin.com/wp-admin/maint/repair.php and click on the “repair database” option. After doing this, we delete the code we added to our wp-config.php file and make our database closed to external access.
Even though we do this, the problem may still continue. In this step, we will need to check the database username and database password in our wp-config.php file. For some reason, the database may have changed its username or password.
1707/5000define (‘DB_NAME’, ‘database-your name’);
define (‘DB_USER’, ‘database-username’);
define (‘DB_PASSWORD’, ‘database-password’);
define (‘DB_HOST’, ‘localhost’);
For a healthy connection, your database-name, database-username and database-password must be the same as the database information you created in the cPanel.
The reason for our error may be that our site is getting too much traffic. In this case, we need to check if our MySQL server is removing traffic to our site.
In order to solve this problem that we encounter more in cases where shared hosting is used, we need to check the traffic of other sites we host on our hosting. You can move the site with high traffic to a server with a stronger MySQL server and solve the problem.
The Syntax error, the last entry in the WordPress directory, is an error encountered when the rules of the programming language used are not followed. You can think of this error as the sequence of items in a Turkish sentence is incorrect. Just as we have difficulty understanding a misplaced sentence, the compiler also has difficulty understanding the codes and gives this error.
Syntax errors in WordPress can be easily fixed. In order to eliminate the error, you must first identify the line with the error code and make the necessary editing on that line.
Let’s examine an example syntax error error:
… ../ home / u694443746 / public_html / wp-content / themes / twentyseventeen / wp- content.php on line 15
In the explanation above, we understand that the error is in the code block in 15 lines. Then, when we open the relevant line of the file by connecting from ftp and make the necessary editing, we will fix the error.