WordPress.org

Ready to get started?Download WordPress

Forums

Autoupdate: "Unable to locate WordPress Root directory" (10 posts)

  1. NetReaper
    Member
    Posted 4 years ago #

    Hi, I've got an autoupdate problem. Currently I'm trying to update from 2.8.1 to 2.8.2, but I also had the problem with the last upgrade.

    When trying to update I get the message:

    Unable to locate WordPress Root directory

    The root directory is correctly set up as described here. The point is that the auto update worked once before, the problems came with version 2.8.

    Any ideas? Do I have to define the root directory in the wp-config.php?

  2. ryans149
    Member
    Posted 4 years ago #

    No, in wp-config.php file, you only have to define the database details, and not the directory path.

    Make sure you have set the correct path in database, as mentioned here

    Also, go to Settings ---> General and set the path correctly....

  3. NetReaper
    Member
    Posted 4 years ago #

    No, both of the paths are set correctly. As I mentioned above I didn't change anything since the last successfull auto upgrade from 2.7.1 to 2.8.

    Totally confusing is the message when I call /wp-admin/upgrade.php - wordpress says that there's no upgrade necessary.

    Any ideas?

  4. tduncklee
    Member
    Posted 4 years ago #

    There appears to be several reasons for this error. For me the solution was in looking at the apache error log.
    open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s):
    Add this to your apache config:
    php_admin_value open_basedir "... /tmp:/var/tmp ..."

    TD

  5. greentalk
    Member
    Posted 4 years ago #

    I am having the same problem. I have not been able to upgrade to 2.8.4 with the same message. In fact, I have not been able to use the upgrade tool very little. It always get stuck and says it could not a copy a particular file.

    I have tried to explain this to my host but no one else seems to have this problem. I am on linux.

    Can anyone help? I really would like to use the auto upgrade rather than manual.

  6. profitsbuzz
    Member
    Posted 4 years ago #

    I am also facing the same issue, does the admin have any resolution to this issue.

  7. manntis
    Member
    Posted 4 years ago #

    I've installed wordpress on 2 different websites, both hosted on the same server, with the same settings, etc.

    On the 1st one, everything went smoothly.

    On the 2nd one, whenever I tried to upload an image to a post it would say it was unable to access the wp-conent/uploads/2009/10 folder and did I have server permission, yadda yadda yadda.

    I noticed there was no uploads folder created when I set up wordpress, so I manually created one. Nope, problem still happened. So I temporarily set CHMOD permissions on the newly created uploads folder AND the containing wp-content folder to 777.

    The photo upload worked.

    I then reset them to 775, and every subsequent upload worked.

    Going on that logic, after trying all the other backflips and workarounds suggested for this problem to no avail, I manually created an 'upgrades' folder in wp-content, set CHMOD permissions for 'upgrades', its containing 'wp-content' folder, and its containing root folder to 777 and attempted a plugin upgrade.

    It worked.

    I then reset them to CHMOD 755 and attempted to upgrade a 2nd plugin. It also worked.

    The trick seems to be to temporarily open up your security for the *first use*, then close it back up again for subsequent use. This way a precident is set for the path and WordPress can find it.

    I hope that helps you as it helped me.

  8. medsdeb
    Member
    Posted 4 years ago #

    There is a solution from a user here called "mcarretero" post link is here , his fix was to add this code

    if(is_admin()) {
    	add_filter('filesystem_method', create_function('$a', 'return "direct";' ));
    	define( 'FS_CHMOD_DIR', 0751 );
    }

    to the your wp-config.php file. I had the same problem and this fixed it for me.

  9. Moe-Gunz
    Member
    Posted 4 years ago #

    Worked for me also :)

  10. dblast
    Member
    Posted 4 years ago #

    I did this and then got;

    Downloading update from http://wordpress.org/wordpress-2.9.2.zip.

    Unpacking the update.

    Could not copy file: /usr/local/4admin/apache/vhosts/warrior-scholar.com/httpdocs/blog/wp-content/upgrade/wordpress-2.9.2/wordpress/wp-comments-post.php

    Installation Failed

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic