Replies: 0
Description
I recently moved a wordpress website from a shared hosting to a cloud VPS and noticed few issues while moving. In particular, even after assigning ownership to apache or ftp users to all files, and permissions 755 and 644 to respectively folders and files, I receive an error “Installation failed: Could not create directory.” when installing/updating any plugin. Maybe is a problem with SSL, but is set as false in wp-config.
Steps taken
1) After moving the website I tried to update a plugin and asked me FTP credentials. I gave them selecting SSL connection. However gave me an error stating that could not find wp-content folder (do not remember exact line) since the FTP paths changed from old and new server.
2) I added to the wp-config.php the following lines:
define( ‘FS_METHOD’, ‘ftpext’ );
define( ‘FTP_BASE’, ‘public_html/’ );
define( ‘FTP_CONTENT_DIR’, ‘public_html/wp-content/’ );
define( ‘FTP_PLUGIN_DIR ‘, ‘public_html/wp-content/plugins/’ );
define( ‘FTP_USER’, ‘A’ );
define( ‘FTP_PASS’, ‘B’ );
define( ‘FTP_HOST’, ‘C’ );
define( ‘FTP_SSL’, false );`
With A, B, and C being FTP credentials.
3) Trying to install a plugin it says: “Installation failed: Could not create directory.”
4) I set, to try, permissions to 777 for all files and directories with:
find . -type d -exec chmod 777 {} \;
find . -type d -exec chmod 777 {} \;
But the error is still there.
5) I change ownership from apache user www-data to the FTP user A with
chown -R A:A public_html
but the error is still there..
6)The debug.log shows one type of errors: “ftp_pwd(): SSL connection failed: session reuse required” but in wp-config.php FTP_SSL is set to false.