1. Insufficient permissions
It may be that the operation and maintenance personnel have restricted the folder permissions for security reasons. In this case, set the permissions of the folder /wp-content/uploads to 755 or higher
2. The upload path of the database is incorrect
Enter the PHPMyAdmin database and check the upload_path key value in the wp_options table to see if the path is wp-content/uploads. If it is not this path, change the path to wp-content/uploads and save it, as shown in the figure below
3. Apache or nginx pseudo-static rule error
Take Apache as an example, check whether the rules in the .htaccess file under the website root directory / are correct. The default is
# BEGIN WordPress
# The directives (lines) between “BEGIN WordPress” and “END WordPress” are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Note: The file cannot be deleted, otherwise an error will occur
Then check whether there is a .htaccess file in the directories /wp-content/ and /wp-content/uploads/. If so, modify or delete it
4. Check whether there is an image plug-in installed. If so, disable the plug-in first and then try uploading the image
Comments (0)