By Sanjeev Shrivastava Our Bestseller: WordPress Themes
WordPress 3.5 focused more on new enhanced media uploader and as expected it fetched user’s attentions because of its awesomeness. WP3.5 has got one more change; it removed the option of changing media upload directory path from media setting options.
Those Websites which are running on older version of WordPress and have changed default media upload path, after upgrading to WordPress 3.5 they may encounter some problem with plugins. Now how to keep that change in WordPress 3.5 too? This post will tell you how to simple change the media upload path in version 3.5.
Note: Implement this tutorial if you know what you are doing and why are you doing. It’s not for beginners.
You have to edit the ‘ wp-config.php ’ file to change default media upload location. ‘wp-config.php’ file is located in base directory of your WordPress installation.
Suppose you want to change your media upload location to ‘wp-content/mynewupload’ then you will have to put the following code in ‘ wp-config.php ’
define( ‘UPLOADS’, ‘wp-content/’.’mynewupload’ );If you don’t want to make your upload directory inside ‘ wp-content ’ directory then you should edit UPLOADS constant like this:
define( ‘UPLOADS’, ”.’mynewupload’ );This was really easy but you should be careful while doing this in your website. You need to take care of other plugins and widgets which use your media files.
Another way of doing the same thing is “WordPress way”, yes just few clicks and you are done. There’s a cool plugin named ‘ WP Original Media Path ’ which can be used to achieve the same thing. This plugin also lets you store your media files to a different sub-domain.
To download this plugin Click Here. Install and activate this plugin in your WordPress website.
After activating this plugin, go to your media settings and you will get more options. Default media settings in WordPress 3.5 look like this:
After installing wp original media path plugin, you will see more options in media settings:
Conclusion:This plugin is really easy to use and is good in doing its task. Now the question is when we create new directory, do we need to put restrictions over it? Do we need to secure it? By default WordPress adds its own restriction on that directory which media upload directory had. You are just changing the location and nothing else. If you want to additionally add some security measures to your upload folder then consider reading this post on securing your media upload folder.
About Sanjeev Shrivastava
author
Sanjeev loves web and his blog InfoTuts. His curiosity to know how things actually work keeps him active and inspires him to learn new things. He loves to help people. You can join him Here
Comments and Responses
0 nhận xét:
Đăng nhận xét