There are two possible solutions, you can try:
Solution 1 – Changing Uploads Directory In WordPress Settings
If you have moved your WordPress to a new hosting recently. There is great chance that path to your WordPress uploads directory is incorrect. Follow below steps to correct/verify settings.
- Sign in as admin on WordPress
- click on Settings tab
- select Media.
- Under the section titled Uploading Files, you should see a field named Store uploads in this folder. Now check the path to Uploads directory.
- Once you are sure that uploads directory in WordPress settings is correct press Save button and try to upload files again.
Alternate Method for Solution 1:
If you’re unable to see the uploads directory field in WordPress admin area. Use File Manager or FTP and open up the
wp-config.php file for editing. And add the following code:
define( 'UPLOADS', 'wp-content/uploads' );
This code should be included before this line:
require_once(ABSPATH . 'wp-settings.php');
Now try to upload media files again. If you still get error proceed to Option 2.
It is may be better to reset the folder permissions of your uploads folder. For this, you can use an FTP client, like FileZilla or File Manger as well. Follow these steps to reset folder permissions using FileZilla:
- Connect to your account with FileZilla.
- Go to WordPress installation directory (in most cases it’s
public_html) and open
- Once inside, right-click on the Uploads directory.
- Click on File Permissions, which will prompt open a dialog box.
- Here, find the Numeric value field, and enter 755.
- Check the Recurse into subdirectories option if not already checked.
- Select Apply to directories only from the radio buttons.
- Click OK.
Hope it helps! :)