By default WordPress uploads all the images/files to wp-content/uploads folder and I never bothered to check that this can be changed or not, as I was happily posting through Windows Live Writer, while I was using Windows XP.
Now that I shifted to Mac OS X, I started using Ecto and I started hating it big time, just for the reason that it doesn’t have the FTP upload feature and because I keep all my images in the http://www.reviewsaurus.com/images/ folder, I was getting frustrated as there was no simple way of inserting the images because if I wanted to include images in the post then I would have done these steps :
1. Take the screenshot using Skitch & save it.
2. Upload the image using CyberDuck (ftp program).
3. Insert the image using the URL.
Well, it’s not simple trust me it’s not, when you have to write 2-3 posts a day then you would not love to perform these steps when you never had to do it before.
So, I started my research and found out that we can easily change the image/file upload location of WordPress and then everything got simple!
Here’s how we can change the image/file upload location of WordPress :
1. Create a new file called path.php and paste the following code in it :
<?php
$p = getcwd();
echo $p;
?>
2. Upload it in the folder of your webserver (remember to use the folder where you want the images/files to be uploaded).
3. Open the file in webbrowser for e.g. http://www.example.com/images/path.php
4. Copy the path : this path is the absolute path of the images folder.
5. On WordPress Admin panel; go to Options->Misc
6. Paste the copied path in the text box and save the changes.
From now on whenever you’ll use WordPress admin or if you’ll use any blogging client then it will upload the images in the desired directory and not wp-content/uploads
Other Important Articles
- WordPress 2.5 is out and here are some of the precautions you need to take!
- Have more widgets below the content without cluttering the WordPress post!
- Use FTP upload in BlogJet while using WordPress!
- First Free Set Of WordPress Minimalist Themes From DesignSaurus!
- PodMailing- Send huge attachments very quickly!
Keith Dsouza
March 27th, 2008 at 3:55 am #
Nice tip buddy quite useful when moving from one Blogging Client to another too ;) Stumbled
ReviewSaurus
March 27th, 2008 at 6:34 am #
@ Keith : Thanks for stumble and indeed now I don’t find problem in using any blog editor provided it’s got the basic features right :)
Binny V A
March 27th, 2008 at 11:55 pm #
Did you try to create a link to /images/ folder in /wp-contents/uploads ? That is /wp-contents/uploads/ should point to /images/
My first guess is it will work.
ReviewSaurus
March 28th, 2008 at 1:06 am #
@ Binny : Well, I’ve never tried that and I even don’t know how to even do it. Can you tell us that how that can be done ?
Binny V A
March 29th, 2008 at 9:53 pm #
If you have ssh access, go to the folder where your site is located in a terminal and run this command…
ln -s wp-contents/uploads images
I am assuming that you are using a linux server.
ReviewSaurus
March 30th, 2008 at 11:02 am #
@ Binny : Yes I’m on linux server..however I’m currently fine with the solution I found :)
Why don’t you write a post on this ? I’m sure there will b emore people who’d love to change the image/file location
CAR57
June 10th, 2008 at 9:02 pm #
I’m totally new to WP, just went through QuickStart PHP for 2 weeks–I too want to change the folder to the images folder for my custom theme, but the instructions above for making a path.php file above and putting it in the theme’s images folder did not work–get 404 error no matter what url I put in my my browser (I have a local install of WP on my Mac, using MAMP to administer it). Can someone give the dummy explanation of the above instructions?
tom stone
November 18th, 2008 at 3:21 am #
Am I missing the point here but why dont you just go to settings > misc > store uploads in the folder
You can just change it there with out using any code.