WordPress 3.5 custom media upload path missing
After WordPress 3.5 was released many of useful options were removed or simply disabled because of some reason. One of those options is possibility to define custom path where you want your pictures (and other media files) to be uploaded. This is really important in case – you want to use CDN or you want to use some other web server to serve that static content (both are simply a must for medium and big sites).
So if you go to Settings -> Media in your WordPress (versions after 3.5) you will see something like this:
And it should look like this (versions prior 3.5):
In order to enable custom media upload paths go to phpMyAdmin and open Database of your WordPress 3.5 installation, then locate table wp_options (could be different depending on your prefix) and then those two option_name inputs:
And change them according to your needs.
Same domain just different folder Example
– upload_path to images
– upload_url_path to http://www.yoursite.com/images
Subdomain example
– upload_path to images
– upload_url_path to http://images.yoursite.com
– then go to cPanel and setup that subdomain like this
After setting those two values in phpMyAdmin those two forms will appear in WordPress so you can change it’s values if needed. If this helped you out please post some comments. Also if you need any help or experience any problems – feel free to leave a comment.
RVOLA
January 6, 2013 - 1:11 pm
Hello I wrote a small plugin for the new facilities WordPress 3.5.
You can directly modify the domain or subdomain
http://wordpress.org/extend/plugins/wp-original-media-path/
Tony
January 7, 2013 - 4:51 pm
Great stuff! Thanks for sharing…
Rodolfo
January 24, 2013 - 3:35 am
no need of going into PHPMyAdmin, simply open
http://example.com/wp-admin/options.php
Mario
January 24, 2013 - 3:37 pm
Great advice !!!…opening options.php problem will be solved?!
Connie
January 31, 2013 - 12:21 pm
you have to add this in wp-config.php:
define( 'UPLOADS', 'wp-content/'.'nameofyourfolder' );
the problem is that the new media-uploader does not work if this option is not set in the config-file!
Connie
January 31, 2013 - 12:24 pm
me again!
There is no sense to edit tables in the database or to edit files in admin, all this will be overwritten with the next WP release (and you know how often this happens!)
only chance is to keep it in the wp-config-file, which will not be overwritten when updating
Phong thuy Cuoc Song
February 5, 2013 - 4:54 am
Thanks very much.
It’s fun because your instructions or, I find this solution when installing new version of WP 3.5
Thanks for your post it helped me solve the path containing the images.
Sincerely
Fernando Zorrilla
June 28, 2014 - 11:21 pm
Great. Solved the mistery….