Last few scribblings
- How MyPhoneExplorer helps Android / HTC / Droid / X10 owners
- 01-Sep-2010
- The Book of Five Rings by Miyamoto Musashi
- 08-Apr-2010
- Really Old Stable Joomla :-)
- 19-Mar-2010
- Check link popularity based on ranking (Google PageRank, Alexa, etc)
- 18-Mar-2010
- Free CakePHP E-Book - Super Awesome Advanced CakePHP Tips
- 18-Mar-2010
- Xmouse on Windows 7
- 01-Mar-2010
- Happy Birthday Alexander!
- 10-Feb-2010
- 1st Kyu (Iwama-Ryu)
- 03-Feb-2010
- To all those ..
- 24-Dec-2009
- Netgear EVA9150 Digital Entertainer Elite
- 05-Dec-2009
jonjo.se
piglets.org
Alain's Jabberbox
Ads by Google
The Local
Categories
Archives
Top Exits
en.wikipedia.org (235)
www.sevenforums.com (30)
www.joho.se (27)
www.pseudocoder.com (27)
freshmeat.net (19)
www.sevenforums.com (30)
www.joho.se (27)
www.pseudocoder.com (27)
freshmeat.net (19)
Popular Entries
- JoomlaFCK - FCKeditor for Joomla (27618)
- QuadraPop high score 2007-01 (22034)
- PuTTY with Tabs (17081)
- Serendipity Blog Software Update! (11879)
- Aikido 3D (11776)
- Cool cooling of your laptop (10944)
- Where in the world is Rod Jackson? (9143)
- Looking for that re-usable Wiki engine code (8932)
- Sony Ericsson P900 Theme: JoHo Orange (8384)
- Samsung LE-40F86BD, sweet rock 'n' roll (8171)
Freakonomics
Blog Administration
Friday, November 27. 2009
Fixing /tmp sillyness in WordPress
Something that has annoyed me for quite some time with WordPress is its inability to figure out which temporary path to use when installing new themes and plugins, as well as when you upgrade WordPress itself.On most servers where I use WordPress, the "global temporary" /tmp is not available, and this is a good thing. Unfortunately, it causes some problems for WordPress since the default tits-up action is to default to /tmp when all else fails. That in itself isn't that big of a problem, but IMHO, there's a more appropriate way of figuring out where to put temporary files: use the configured UPLOAD path. And when I say the "configured UPLOAD path", I mean the one PHP thinks it should be using.
Why is this a good idea? Well.. a) the system administrator has configured it like it is configured for a reason, b) there's a fair chance WordPress can actually write to this directory, and c) it makes WordPress so much more flexible in multi-site environments.
Fortunately, there is a way to get WordPress to habla.
Find and edit your wp-config.php file in the WordPress root. Somewhere (it doesn't matter where, just as long as you put it inside the , put this line:
define ('WP_TEMP_DIR', ini_get ('upload_tmp_dir'));
Save the file and Bob's your uncle.
Comments
Display comments as
(Linear | Threaded)
Add Comment


