Change the path of uploads folder for existing WordPress site
When you are developing website in WordPress, You may need to change default Upload media folder, There are many reasons with users they need to change the default upload directory in WordPress.
In Prior version of WordPress 3.5, User are able to change the upload directory path directly from the admin Settings in the backend, but in newer version this is no longer possible.
To change default media upload folder, you need to edit the wp-config.php file located in the root directory of your WordPress installation.
If you want upload directory to be wp-content/new_media then you will need to place the following code in wp-config.php
1 |
define( 'UPLOADS', 'wp-content/'.'new_media' ); |
Now all the image that you will upload, store in new_media directory.
And If your upload directory outside from wp-content, then you need to set upload path in wp-config.php like this:
1 |
define( 'UPLOADS', ''.'files' ); |
this will set upload directory to http://www.domain.com/new_media/
After this you will face a problem, all of you new images will work perfectly, but what about old images ??? For exstining images you need to Copy all images of old uploads folder to new folder which has set in the wp-config.php file.
[paypal-donation]