TransWikia.com

Wordpress media upload issue could not insert attachment into the database

WordPress Development Asked by Aman Kamboj on December 19, 2020

Could not insert attachment into the database.

When ever I try to upload new images from WordPress media it shows me above error.

Please help me why wp database shows this error.

One Answer

Try the following solutins:

  1. First of all check your WP database size and check whether the size is full according to your hosting provider's requirement/rule.

  2. Second option, add this line into your wp-config.php:

define('WP_MEMORY_LIMIT', '256M');

Also if you have access to php.ini (or php[version number].ini) file on your server, try to add this line:

memory_limit 512M 
  1. By default, some database configs have a collation or charset that doesn't allow special character. Check whether the file name of the image you're trying to upload is having any special characters. If so, delete them and use only alphanumeric. Then retry.

  2. Also, please check your folder permission. Read more about it on https://www.wpbeginner.com/wp-tutorials/how-to-fix-image-upload-issue-in-wordpress/

Hope it helps.

Answered by Walter P. on December 19, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP