You are currently viewing Could not insert attachment into the database

Could not insert attachment into the database

This happens when you try to upload any media from your WordPress admin dashboard under add new media. In this article, we cover how to resolve the error “Could not insert attachment”.

Solution: How to resolve the “Could not insert attachment into the database” WordPress error

  1. Access PHPmyadmin and click on the database of the domain showing the error.
  2. Access the posts table
  3. Click the Operations tab at the top
Could not insert attachment

4. In the Table options section set AUTO_INCREMENT to 9999 and click Go button to apply the changes.

Could not insert attachment

5. Back to your Cpanel, search for MYSQL DATABASE

mysql database

6. Select your database under the Check Database option and click on Check Database button to check for the database health.

7. After the check, go back to the “Modify Database page” , select your database under Repair Database row and click on Repair Database. This repairs your database in case of any errors.

This should resolve the error.

Other checks Quick checks.

  • Check if your WordPress folders have the right permissions. The folders to pay attention to are wp-content, inside it is the uploads folder and all folders inside have the permission 0755
  • Check if your disk has space to accommodate the new media files.

Web Hosting and email hosting Packages

For web development services, SEO services, Digital marketing strategies, website set up services, web hosting and domain registration; contact Dynamic Technologies.

Related content