Best Wp-config Snippets For WordPress:- In WordPress install, the wp-config file is a very crucial file which can be used as per requirement of the site. With the help of this, your site can be made more secure, less time-consuming in page loading, optimize your database. Apart from this, it performs many other customization. This wp-config. The file is available in the root folder (usually the public HTML directory) of your WordPress install.
In this article, we are going to explain the best wp-config snippets which can be used by you on any WordPress site. Now without taking any more time, we are going to tell you some specified location where you need to place each snippet respectively-
- Change table prefixes- It exists in the default wp-config which needs to find and overwrite it. If you want more WordPress security then you need to change the prefixes of your database tables. If there is any need to change in securing prefix that contains more characters then you can easily modify it. For this, you just have to overwrite the value of the stable prefix variable in your wp-config file.
- Enable the WordPress debugger– This is also available in the default wp-config, you just need to overwrite it. A debugger is an inbuilt feature in WordPress which is used to get notifications related to bugs and different issues that are prevailing in your website. This WordPress debugger should not be used on a production site unless you want that visitors can see the notifications about the errors.
- Empty trash automatically– It is located at the beginning of the wp-config file but above from the MySql setting. If you are using wp-config file then you can easily configure that how frequently WordPress is clearing your trash. If you are using 0 as value then you will not be able to use trash features on your site.
- Specify an autosave interval- Its location at the beginning of the wp-config file but above the MySql settings. If you are using WordPress then by default, you will be able to auto-save your posts and pages in every 60 seconds. In your wp-config file, you can easily enhance or reduce this value but here you need to specify the interval in seconds.
- Limit the number of post revisions– If you save the post then with the help of WordPress, revision of post can be saved to the database easily. Apart from this, if you have the latest auto-save then that can also be stored in your records. By doing this, it is seen that a single post contains 20 or 30 versions in the wp-posts database table. With time passing, you will see lots of redundancies in the database.