Using wp-config to Customize WordPress

Originally published at: http://www.sitepoint.com/using-wp-config-customize-wordpress/

As you may already know, you can entirely customize the layout of a WordPress website thanks to the different existing themes, and you can even create your own if you want to have a fully personalized website.

That’s a good thing, but did you know that the configuration of WordPress itself can also be modified? That’s the aim of the wp-config file.

In this article, we will take a look at the wp-config file in order to know what it is, what it contains, and what we can (and must not!) do with it.

What Is the wp-config File?

When I mention wp-config file, I am referring to the file wp-config.php that is located in the root of your WordPress installation. It contains much of the information that WordPress needs to function. If you don’t correctly fill this file, your WordPress installation won’t work. That means you won’t be able to start your website and you could even break your installation by making a mistake in an edit of this file.

To avoid these mistakes, it is important to know exactly what the wp-config file contains. This way, you will be able to modify what you want without taking any risk (but be sure to test your changes locally before sending them on to your server).

Moreover, understanding the wp-config file will allow you to add some parameters, to modify the default behavior of WordPress.

Continue reading this article on SitePoint

Great article and has very clear examples. Actually i have created similar article on wp-config http://www.sevensignature.com/blog/articles/unfolding-magical-file-wordpress-wp-config-php/ which has covered almost all the aspects of wp-config.php file and has provided some resources at the end of the article where you can find any solution of wp-config.php file.

I thought

define('EMPTY_TRASH_DAYS', 0);

set WordPress to not use the trash and delete the item straight away?

Oops! I confounded with something else, I fix this error right now, thanks!

any luck moving the wp-admin folder? i’ve been able to move it via wp-config.php but usually find plugins have a problem b/c they have ‘wp-admin’ hard coded which would need to be changed which created future work with updates.

As the wp-admin folder is hard coded, I don’t think the wp-config file will be sufficient to do what you want. Maybe you can play with the .htaccess file to redirect the paths (if it is possible). Otherwise, I see another simple solution: a symbolic link named wp-admin pointing to your own administration folder.

I’m curious: why moving the wp-admin folder?

I always try to hide as much of WordPress as I can for security reasons and also so competitors of my clients’ websites can’t easily see what’s running their online website. Since WordPress is so popular it’s always been a target for hackers so the security is the most important but I don’t want a competitor cruising a site and knowing if it potentially cost a few $K or $100K.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.