From this tutorial you’ll learn how to configure WordPress engine to enhance website performance, extend database functionality and improve your data secureness. To learn more about the subject, please, proceed with reading our awesome WordPress engine configuration tips!
Detecting Database Host
You can easily detect the database host using wp-config.php file, which is located in WordPress directory.
Access wp-config.php file and open it in any code editor that is convenient for you.
Locate the following line of code, that detects the database server host.
Repairing Database Issues
There is an option that allows to repair and optimize database using WordPress. WordPress CMS will automatically detect the issues with the database and fix them. It will increase website performance.
Add the following line to wp-config.php file to use this feature.
Fixing Update Problems
If you’re facing problems with updates you might need to define the filesystem method to use on the server. The method can be direct, ssh2, ftpext or ftpsockets. Add the following line of code to wp-config.php file.
Finding Errors and Deprecated Functions
If you’re a developer and you need to locate errors and deprecated functions, you can do it as follows. Locate the ‘WP_DEBUG’ line of code and apply the following changes.
Note, that by default the function is false, and you have to enable it in the development mode.
Reducing the Number of Database Queries
When you define your site address and WordPress address under Settings > General tab, this information is added to the database, and every time you need this information WordPress runs a database query.
Add the following line of code to reduce the number of these queries.
Overriding File Permissions
To override file permissions add the following line of code to the wp-config.php file.
This method proves to be useful when your host has restrictive permissions for user files.
Setting Custom Post Backup Time
As a rule, WordPress saves post content every 60 seconds, but you can set your own time limit. To do it add the following line of code to wp-config.php file.
Setting Custom Trash Cleaning Time
Usually, the files in the Trash bin are deleted every 30 days. But you can change the time period to your custom one. To do it just add the following line of code to wp-config.php file.
In the case, you need to disable the trash bin, add the following line of code.
Solving “Memory Exhausted” Error
If you get Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) error, then you need to increase the memory limit. To do it add the following line of code.