• Resolved rod

    (@nomadarod)


    Hi,
    I get this error message when trying to update: Update failed: The package could not be installed. PCLZIP_ERR_MISSING_FILE (-4) : Missing archive file ‘/tmp/wordfence.7.5.10-B3Np9a.tmp’

    I get the same error for another plugin. And if I try to update through upload of the zip file, I get a “Missing a temporary folder” message.

    Any ideas why could it be missing? Is it something I can correct without causing errors or breaking the site?

    Thanks
    Rod

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter rod

    (@nomadarod)

    Hi,

    Solved it by following a tutorial.
    Basically:
    – I edited wp-config.php by adding the line: define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/'); right before the “‘That’s all, stop editing! ”

    – I created a “temp” folder inside /wp-content/

    Still wonder how this folder disappeared.

    Thanks for reaching out.

    The directory /tmp is a server folder (not a Wordfence or WordPress created or specific folder) used to store temporary files. Many programs use this /tmp directory for writing temporary data and generally remove the data when it is no longer needed. Otherwise the /tmp directory is cleared when the server restarts. When WordPress installs a plugin it is unzipped in this /tmp directory. The /tmp directory may have some sort of permissions errors that isn’t allowing your server user or PHP user (not to be confused with your WordPress user) to place files there. Your hosting provider can probably help with that. Have them check all the file and folder permissions in the hosting account just to be sure.

    It does sound like you found a workaround by defining the location but if you have problems again, please try the above.

    Tim

    PS : I found a link to the instructions for this in an article by HostPapa in case someone needs them.
    https://www.hostpapa.com/knowledgebase/how-to-fix-missing-temporary-folder-error-in-wordpress/

    Thread Starter rod

    (@nomadarod)

    Hi Tim,
    Big thanks for the clear and detailed reply. It makes sense now. I’ll look at those instructions.

    Cheers,
    Rod

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t update plugin’ is closed to new replies.