Unable to add new Media to Wordpress

Created:

2017-01-23 22:11:11 UTC

Modified:

2017-08-21 06:37:26 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to add new Media to Wordpress

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux

Symptoms

  • Unable to add new Media to Wordpress:
    Unable to create directory wp-content/uploads/2017/01. Is its parent directory writable by the server?
  • PHP-FPM serverd by apache handler is used.

Cause

Incorrect ownership/permissions on /httpdpcs/wp-content/uploads folder.

Resolution

1. Check if /httpdpcs/wp-content/uploads folder exists in Domains > example.com > File Manager. Find wp-content folder, open it and check for uploads folder. If it does not exist, create it under wp-content folder: access wp-content folder, click New > Create Directory.

2. Make sure that ownership/permissions on /httpdpcs/wp-content/uploads folder and folders inside it are following:

Screenshot_6.png

3. If permissions are different, change them by clicking Change Permissions:

Screenshot_7.png

Alternatively, permissions can be checked from a terminal directly (via CLI on a server):

1. Connect to the server using SSH.

2. Correct permissions are as follows:

# ll -d /var/www/vhosts/example.com/httpdocs/wp-content/uploads
drwxr-xr-x 3 system_username  psacln 4096 Jan 23 22:16 /var/www/vhosts/example.com/httpdocs/wp-content/uploads

3. If the ownership is different, change it for all files and directories inside using below command (replace "system_user" with the actual system user of a subscription):

# find /var/www/vhosts/example.com/httpdocs/wordpress/wp-content/ -type d -exec chown system_user:psacln {} \;
# find /var/www/vhosts/example.com/httpdocs/wordpress/wp-content/ -type f -exec chown system_user:psacln {} \;
Have more questions? Submit a request
Please sign in to leave a comment.