changing upload url, now not uploading
-
I upgraded to 2.02 hoping to be able to upload files to the directory of my choice but was disappointed to find it still forced me to create a directory under the WP directory. I want new images and media files to be placed in a _media directory at my root. I also want the upload function to work this way in the Post Edit page to make it simple for my client so I don’t want to use that upload plugin that gets back to an old version Uploads page.
I discovered that I can simply edit the wp-includes/functions-post.php file and change the line that retrieves the site url (where WP is installed) to retrieve the home url instead (my root).
function wp_upload_dir() {
instead of
$siteurl = get_settings('home');
$siteurl = get_settings('siteurl');
When I test it by editing a post, WP goes through the motions to upload the file to my desired location (correct based on the link I get when I add it to a post) WITHOUT ERROR but the file is never actually uploaded.
Is there another bit of code I need to edit to get WP to actually upload the file to the correct location, outside the WP directory?
PS I thought it might be a permissions thing so I made the permissions on my root 777. Still nothing.
- The topic ‘changing upload url, now not uploading’ is closed to new replies.