WordPress (WP) version 3.5 solution to modify the default upload image path


It is believed that all friends who have contacted WP system know that the upload path of the old system is pointing to the WP content directory by default. Friends who have done WP blog should be familiar with the background settings. In the previous version, the default path for uploading media files was modified in settings. However, I found that in the latest version 3.5, this method can no longer be used in background settings. The original version 3.5 of WordPress cancelled the option of modifying the file upload path. How can the latest version of WordPress 3.5 set and modify the image upload path?

In fact, WordPress version 3.5 allows you to set the path of the media file upload directory. The development community thinks that the modification of the directory path of the uploaded file is not a common setting, so it is canceled from the background UI. To modify the path of the media upload file of WordPress, the webmaster only needs to set it in the wp-config.php file. The method is as follows.

First, open the wp-config.php file in the WordPress root directory, and then add the following line to the file (Anywhere):

  define( ‘UPLOADS’, ”.’uploads’ );

Explain the function of this definition. For example, your domain name is xxx.com, so your image upload path is set to XXX. COM / uploads /. Tip: don’t forget the last semicolon (;).

Then save the wp-config.php file. Upload a picture in the background and test it. It’s successful.

Article from http://www.gscpp.net reprint must keep the link!