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
- Access PHPmyadmin and click on the database of the domain showing the error.
- Access the posts table
- Click the Operations tab at the top
4. In the Table options section set AUTO_INCREMENT to 9999 and click Go button to apply the changes.
5. Back to your Cpanel, search for 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
Related content
- A Practical Tutorial for Dockerizing Software Applications
- How to Configure a Docker App to a Domain Name
- Getting Started with Docker | Docker commands
- How To Run Scripts in Linux
- Deploy a Django Application on EC2 Instance with Nginx
- How to configure a domain to a docker container and install an SSL certificate on AWS