Unable to update Wordpress or upload images in WP Dashboard; Possible thru Wordpress Toolkit

Operating System & Version
CentOS v7.9.2009; PHP 7.4
cPanel & WHM Version
cPanel & WHM v102.0.8 (STANDARD)

Ian Shen

Member
Sep 14, 2018
6
0
76
Tokyo
cPanel Access Level
Root Administrator
OBJECTIVE:
  1. To update plugins and WP core thru the Wordpress Dashboard.
  2. To upload new images to Media Library thru Wordpress Dashboard.
ERRORS: "The uploaded file could not be moved to…" / "Unable to create directory" - Updates failed. Image upload failed.

ATTEMPTED FIXES:
  1. CHMOD - In Terminal, changed all directory permissions to 755, all file permissions to 644, from Wordpress recursively down thru subfolders, esp wp-content
  2. CHOWN - In Terminal, confirmed ownership to be consistent with site user.
  3. In wp-config.php, FS_METHOD is defined as "direct"
WORKAROUND: Successful completion of updates of plugins and WP core (to 5.9.2) via the Wordpress Toolkit in cPanel. HOWEVER, even after upgrade, same errors persists. Cannot upload images, cannot delete plugins thru WP online dashboard.

It seems like a permissions error, but I'm not sure what else to do.
 
Last edited:

Tyrsson

Registered
Apr 19, 2022
2
0
0
Birmingham
cPanel Access Level
Root Administrator
Helpful information would be:

  1. Have you made any other changes to the installation via the control panel?
  2. Is this in the default domains account or somewhere else?
  3. What php modules are installed and active?
In some circumstances when a script such as WP or (simple machines, I was a team member for them) modifies a file the apache instance will take ownership of the directories and files where the script has been executed. Its sounds like a chown issue, not just a chmod issue.