Fix Failed WP Plugin Installation In Safe Mode

When using the new auto plugin installer in WordPress it failed miserably with the following error message:

Downloading install package from http://downloads.wordpress.org/plugin/addthis.1.6.6.zip…

Warning: touch() [function.touch]: SAFE MODE Restriction in effect. The script whose uid is 587 is not allowed to access /tmp owned by uid 0 in /long-path/wp-admin/includes/file.php on line 199

Download failed. Could not create Temporary file.

What to Do?

After some searching I found a simple solution: Just create a new temporary folder in your web root (often called public_html) folder and point WordPress to this new folder.

How Do I Change the /tmp Folder Then?

That’s Easy!

Just add the following line to your wp-config.php

define('WP_TEMP_DIR','/your_path/public_html/tmp');

And make sure to use the name of the folder where WordPress is installed or the root html folder. And also make sure you have created the tmp folder and chmod it to 777 before adding the define to wp-config.php

This is all there is to do, enjoy!

Twitter Digg Delicious Stumbleupon Technorati Facebook Email
Uncategorized

5 Responses to “Fix Failed WP Plugin Installation In Safe Mode”

  1. Thanks for this. Saved me manually installing everything.

  2. You are God, thanks for trick.

  3. I’m not God but I’m glad if I can help :)

  4. It is somethign weird for me. Just the error message changed a little so that it points the folder defined in wp-config.php

    Is there any suggestion?

  5. Gokhan, did you check that you have the permissions right on the new tmp folder?
    sbyholm recently posted..How to Get Backlinks To Your WebsiteMy Profile

Leave a Reply

CommentLuv badge
This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 3 approved comments. Use your real name and then @ your keywords (maximum of 3)