If you are running a WordPress website, you are always looking for new ways to optimise and customize your website with new features. The wp-config file is one of the core functions that help to add more functionality to your website. In order to modify this core file, there are lots of WordPress Configuration tricks you may follow to enhance your site performance and secure your website.

Taking this in mind, in this article, we will provide 10 most valuable WordPress configuration tricks that will help to make your WordPress experience better.

Let’s begin!

The Powerhouse Of Features In WordPress

In WordPress, the configuration file (wp-config.php) is also known as a power house of feature. It is mainly located in the wordpress root directory file. Through this file, you can add more functionality on your site. 

If you are a newbie in wordpress platform, we will suggest you to take a full backup of your site because a small mistake in the wp-config file can make your website inaccessible.

10 Most Valuable WordPress Configuration Tricks

Now, lets know the most valuable WordPress configuration tricks for your website customization below:

1. Basic Database Configuration

Your entire website data is stored in a database comprising blogs, comments and other important pieces of data. So you need to connect your website with a database to work.

During the wordpress installation, you need to fill up the database information such as database name, username, password, and database host. With the setup, WordPress will automatically store the information on the core files. Nevertheless, if it has not happened, then you need to add them manually on the following lines of your wp-config.php file.

define('DB_NAME', 'database-name');
define('DB_USER', 'database-username');
define('DB_PASSWORD', 'database-password');
define('DB_HOST', 'localhost');
wordpress configuration tricks- basic database configuration

 2. Add Security Keys

WordPress Security Keys is a collection of random variables that enhance the encryption of information by adding an extra layer. You will generate security keys and position them on installation in the wp-config.php file. To do this, you have to change the following code,

define( 'AUTH_KEY', 'put your unique phrase here' );
define( 'SECURE_AUTH_KEY', 'put your unique phrase here' );
define( 'LOGGED_IN_KEY', 'put your unique phrase here' );
define( 'NONCE_KEY', 'put your unique phrase here' );
define( 'AUTH_SALT', 'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT', 'put your unique phrase here' );
define( 'NONCE_SALT', 'put your unique phrase here' );

3. Modify the WordPress Table Prefix

A table prefix is a value placed before every table in the WordPress database. By default, WordPress arrives with a wp_ prefix for each database table name.

Since it is merely comfortable to identify the default prefix and hack your site; you have to change the default table prefix to secure your site from hackers. To do that, you have to go through the line of your wp-config file and change according to your needs.

/**  
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
 $table_prefix = 'wp_'; 
 /**

4. Enable WordPress Debug Mode

In WordPress, Debugging is the method of ascertaining errors in your site. If you’ve experienced problems with your website, the debugging function will help you find out about the issue on your site.

By default, the debug mode of your site is turned off. To turn on, you simply need to change the value from true to false. After changing, it will look like as below,

define( 'WP_DEBUG', true );

5. Change your Site Address

Another important configuration trick will be changing your site/blog address from the configuration file. As we all know, we can change the site address from our admin dashboard. But sometimes our tiny mistakes can make our site inaccessible. In this situation, we can modify our site address by putting the following line on the wp-config file.

define('WP_HOME', 'http://www.yourdomain.com');
define('WP_SITEURL', 'http://www.yourdomain.com');

6. Override File Permissions

Whether your server has restricted permissions on all user files, then you can override your file permission. You can do this by simply adding some code on your core file.

define('FS_CHMOD_FILE', 0644);
define('FS_CHMOD_DIR', 0755);

7. Alter Post Revision Settings

WordPress gives the feature to enable autosave option for your posts and pages and reverts to its previous version. This feature helps you most if your browser crashes for some time. 

Here, by default, it saves your post every 60 seconds. But you can change the time settings for autosave by modifying the time interval of the core file. 

define('AUTOSAVE_INTERVAL', 180); // in seconds

Through this configuration file, you can also set the number of your saved post revision.You can do it by changing the line as,

define('WP_POST_REVISIONS', 15);

Not only this,also you can fully disable the feature of the post revision by using the following code on your configuration file,

define( 'WP_POST_REVISIONS', false );

8. Increase PHP Memory Limit

In wordpress, as we install tons of plugins, sometimes we face PHP memory limit issues. This type of problem can slow down our website and site performance. 

You can increase the PHP memory limit through the core file by only adding the code below:

define('WP_MEMORY_LIMIT', '128M');

9. Turn On Multisite Network

A multisite network is a type of network that lets you build and run a network of multiple websites from a single dashboard. This feature helps you to manage all websites from just one place.

If you are running multiple website together, you can easily turn the feature by adding the following code in your wp-confing.php file,

define('WP_ALLOW_MULTISITE', true);

10. Edit Trash Settings

In wordpress, the trash folder stores all the deleted files for a limited period just like a computer. By default, it stores the deleted items for 30 days. You can change the settings according to your needs by putting the desired days on the following code and add it to your core file,

define( ‘EMPTY_TRASH_DAYS’, 22 );

Conclusion

In summary, Since wordpress provides you with the best customization flexibility, you must know the most useful WordPress configuration tricks to tweak your website outlook.

Hopefully, this article helps you to learn the most wanted WordPress configuration tricks to optimise and secure your WordPress website. To learn more about WordPress tips & tricks, you may check our WordPress Tips section.

You may also ask any questions related to it in the comment or want us to write on some specific topics you have in your mind.

We appreciate your further comments, support or suggestions!

Why Choosing The Right Theme Is Crucial For Your Online Business
Integrate SendGrid With Your WordPress Website

Leave a Comment

Your email address will not be published. Required fields are marked *