WordPress.org

Ready to get started?Download WordPress

Forums

Theme and Plugin update - failures - my testing results (4 posts)

  1. oldbrit
    Member
    Posted 2 years ago #

    We've been having problems recently with theme and plugin updates failing with the "can't delete directory" error.

    Here's what I discovered testing this with updating Akismet:

    The permissions and ownership are set to the installation defaults (755 for directories, 644 for files).

    When Akisment plugin is activated and I click "Automatic update", I get the "deactivating" message and then the update fails.

    If I deactivate the plugin first, use the automatic update, and then re-activate the plug-in, the plug-in successfully updates.

    The same is true with updating a theme: If I deactivate the theme first and then do the automatic update, the theme update is successful.

    If the theme is activated when I run the automatic update, the update fails.

    I HAVE NOT READ THE CODE to see what the mechanism is or why this is happening, but in my case, it doesn't appear to be a permission issue. Rather, it appears that the update process fails to actually deactivate the plugin or theme, even though it says it is deactivating the plugin or theme, and doesn't display a message stating that the deactivation failed.

    HERE'S WHAT I AM CURIOUS ABOUT:

    1. Is this what others who are having the problem with plugin and theme updates failing are experiencing? -- That is, deactivating the plugin or theme before using the automatic update, makes the update work correctly.

    2. Is this a permission problem? It doesn't seem to be a permission problem to me. I haven't tested the permissions as carefully, but it appears that changing the permissions on the files and folders doesn't actually fix the problem.

    3. If it is an issue with the automatic deactivation failing, what possible remedies should I try? Do the WordPress coding specification and API have a mechanism for verifying that a plugin or theme successfully deactivated before the update proceeds?

    I'm hoping this information might help in resolving the automatic update failure problem, especially since it seems to be so mysterious and this forum is full of comments about how changing permissions didn't help.

    All feedback is most welcome. We have a lot of WP websites and this update failure problem is creating a lot of extra work.

    Thanks!

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    1. This is the first I've seen of this particular one.

    2. Not sure. Could be a folder ownership issue? Or a problem creating the .maintenance file in the WP root folder? It's definitely site/server specific.

  3. oldbrit
    Member
    Posted 2 years ago #

    esmi:

    Thank you for your quick response

    You seem quite sure that this is a site/server specific issue. Would you please state your reasons for believing this to be site/server specific? As I said, I haven't actually read the code, so, I am relying on testing without going to the source.

    The automatic update creates the .maintenance file without a problem. I know this because when we update an active theme and it fails, the .maintenance file is in the root and displays its message.

    Ownership seems to be an odd possibility for two reasons: 1. Our ownership setup has not changed since the automatic updates started failing a few WP releases ago. 2. If it were an ownership issue, it seems like whether the theme or plugin was active or inactive wouldn't make any difference - the update would fail (or work) either way.

    I've seen a lot of posts from people with automatic update issues indicating that simply changing the permissions or ownership didn't fix the problem, so I'm not sure whether this is new or whether those for whom the permissions and ownership changes didn't fix the issue were actually having this activation / deactivation issue.

    I only discovered the active / inactive behavior accidentally while working with ownership and permissions to see if I could resolve the problem.

    Anyway, I may have to read the code and do some further testing / debugging to see if I can further isolate the issue.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Would you please state your reasons for believing this to be site/server specific?

    As I said, this is the first I've seen of this particular scenario in 3 years of working on these forums. Ergo - it's almost certainly site/server specific.

    Have you tried:

    - deactivating all other plugins except the one you wish to update to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    - switching to the Twenty Eleven theme to rule out any theme-specific problems.

    - resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    - re-uploading the wp-admin and wp-includes folders from a fresh download of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Topic