Could not open handle for fopen() while updating wordpress


Issue : I got the above while updating wordpress and the plugins.

Solution :

This might be due to the temporary directory created on the wordpress directory. You can resolve it using following steps.

1. Create a new directory “tmp” inside “wp-content” directory.

# mkdir tmp

2. Now give it 777 permission and correct it to user ownership.

#chmod 777 tmp

#chown user.user tmp

3. Now define the new directory in wordpress configuration file wp-config.php

define(‘WP_TEMP_DIR’,ABSPATH.’wp-content/tmp/’);

4. Try to update it now.

That’s all….!!!!

MySQL: Can’t create/write to file ‘/backup/tmp/#sql_3c6_0.MYI’ (Errcode: 2)


Issue: I got this error when accessing the certain pages of drupal website.

MySQL: Can’t create/write to file ‘/backup/tmp/#sql_3c6_0.MYI’ (Errcode: 2)

Solution:

Check the location of tmp directory inside my.cnf and change it to /tmp

1.check mysql config : my.cnf

cat /etc/my.cnf | grep tmpdir

2.If the tmpdir is missing or /tmp is not mentioned there, please add it.

i.e; tmpdir=/tmp to my.cnf under [mysqld]

3.Restart the mysql server

/etc/init.d/mysql restart

That’s all……..!!!!

Can’t upgrade or update plugins: “could not create directory”


Issue: I got the above error while updating the WordPress plugins.

Solution:

Check the permission of “wp-content” directory and “upgrade” directory inside it.

It should be under user ownership.

ie:  chown -R user.user wp-content/

Also correct the directory permission to 755

ie: chmod 755 wp-content

chmod 755 wp-content/upgrade

Try now to upgrade the plugins.

That’s all………!!!!

Blog Stats

  • 37,402 hits