What Happend to WordPress’ Media File URL Option?

Beats me! God only knows why the wp folk decided to hose that option, or maybe it’s a bug. Whatever the case my be, I thought the custom File URL option (found under Settings > Media) was a very handy tool of which I have always made good use, and I want it back real bad. So bad, in fact, I figured out how. Very simply add this to your theme’s functions.php file:
update_option(‘upload_url_path’, ‘/wordpress/wp-content/uploads’);
Obviously, change the path to reflect your needs. Unfortunately, this hard-codes this path from functions.php, so although the field is added back to Settings > Media, and it may look like you can update the path from there, it will not save your changes. But in reality, a developer will only need to change this once or twice.

I find this option handy when developing a site at a temporary domain, knowing it will ultimately be migrated to a live domain. Otherwise, you get a fully-qualified temporary URL embedded in all your media attachments which are going to have to be changed anytime the site is moved to a new domain.
This option has saved me from the headache of having to mess with the wordpress mysql database more than necessary.

I will update this post as soon as I can add some convenience to this temporary solution.

WordPress Media: Increase Maximum Upload File Size

Revised: 09/18/2012
In WordPress Media Manager, the default settings for “maximum upload file size” seem to come out different for each installation, depending on the server. Most often, the max size is descent enough to live with, but after a recent install was only offering an insultingly low 2MB, I figured it’s best to be prepared to increase this value quickly & painlessly.
* Note: There’s also a chance that your hosting provider has the security for these parameters locked down pretty tight. If you try all of these steps and nothing is changed, you may need to contact your host and ask them nicely to do this for you.

This modification can be implemented from either of 2 files: php.ini & .htaccess.

My examples will be increasing the file size to 30MB, so feel free to change this numeric value to your preference.


1. Locate a file called php.ini. If you have SSH access, that’s great. You may find it with this:
php -i | grep php.ini
Otherwise, logon to your server via your FTP client and look in the root folder, as well as public_html. If it doesn’t appear to exist, you can make one yourself by creating a text file and saving it as php.ini.

2. Insert the following text into the php.ini file:
memory_limit = 100M
upload_max_filesize = 30M
post_max_size = 30M
file_uploads = On

3. Place the modified file. There are a number of locations to place the file, and different things seem to work for different people. If you modified a pre-existing file, try putting it back where you found it. Of course I recommend what worked for me, which is placing it inside the /wordpress/wp-admin folder. This may also be desirable because it will only affect that area of your site.


Some hosts, such as Rackspace, seem to prefer this method. Locate your .htaccess file, likely found in public_html or equivalent, and add these lines:
php_value upload_max_filesize 30M
php_value post_max_size 30M
php_value max_execution_time 200
php_value max_input_time 200

wp-config.php modification

Adding the following code to wp-config.php has worked for some people, but may not always be necessary.
/* Increases max file size for uploads */
define(‘WP_MEMORY_LIMIT’, ‘100M’);


Be sure to cover each of these bases & to experiment with the location of the php.ini. One of these four locations should work: Root folder, public_html, wordpress (your wordpress install), or wordpress/wp-admin. In some cases, the .ini file may need to be renamed to php5.ini. Try both files in each location until the WordPress Media Manager reads “Maximum upload file size: 30MB”. Like I said, your host ultimately has control over whether or not this increase will be allowed. So, if all else fails, you’ll need to ask for their assistance. Good luck!