When it comes to configuring WordPress, you may find it hard if you don’t have any configuration help file. Actually, configuration file keeps lots of mysteries in itself. It holds several tricks and tips to guide users although; most of the users use it only for changing database credentials and security keys. Here are some wp-config.php tips and tricks highlighted that will assist you a lot on your way.
What is Configuration File?
Configuration file is actually control file located at root of WordPress installation. It contains built-in constants like database name, username, password, host and certain plugins. Some tips to get most out of it are:
- First tip for you is security and for this, you need to move your wp-config.php file one folder above WordPress root. It will help you protecting this file from anyone else’s access as he/she will need FTP or SSH.
- Some database credential, you may not aware of are: define(‘DB_NAME’, ‘database-name’), define(‘DB_USER’, ‘database-username’);, define(‘DB_PASSWORD’, ‘database-password’); and define(‘DB_HOST’, ‘localhost:3307’);, although, these are most commonly used.
- If you want translation of WordPress in any other language except English, you can configure the language by using the commands: define(‘WPLANG’, ”);and define(‘LANGDIR’, ”);.
- What if you want to override wp_options value for site URL? By the manual command of define(‘WP_SITEURL’, ‘http://mydomain.com/wordpress_folder’);, you can do so.
- During development, if you will turn on debugging of WordPress, it can serve you more than your expectations. You can turn on WordPress debug with the help of this constant. Just use define(‘WP_DEBUG’, true); and debug will be activated.
- You can configure WordPress Trash for how many days to keep things in trash. For configuration of trash, you can use define(‘EMPTY_TRASH_DAYS’, 7 ); command.
By following above described credentials, you can get most out of your WordPress platform by making it more efficient.
Comments are closed.