Change the location of the image upload directory in WordPress

I always change the WordPress default upload directory for images, I usually want it somewhere in a subdirectory of the /img directory, together with all other images. I find it easier to manage all images when they are stored in one location.

So, for my own personal note, this is what I do. In the file wp-config.php I set the relative path to the image directory.

// Directory for uploading images
define('UPLOADS', '../img/wp');

Now, all images will reside in this directory. Be sure to verify that upload works. The directory path must be relative the installation directory of WordPress and the UPLOADS directory must be writable by the webserver.