0

Environment: The WordPress site is on my local laptop, 4.9.6. Windows 10, XAMPP installation, PHP 7.

The procedure works fine on the remote production server with LAMP.

Problem: I'm trying to upload a new logo to the media library. The file seems to start to upload, but then I get the error message with the red vertical stripe on the left side,

revised logo.png

Could not insert post into the database

When I look in the uploads folder, the new month folder ("5" for May) hasn't been created, so the file wasn't uploaded, either.

Not sure where I need to start on this. The error message says database, but since the file was never uploaded, it seems like a file problem.

It Now Works:

I don't know why the WP Migrate tool exports SQL that doesn't set the ID columns of my WP tables to auto increment. In my case, setting wp_posts and wp_postmeta ID fields to auto increment, using PhpMyAdmin, was the last procedure I did that resulted in the media library being able to insert new images.

1

setting wp_posts ID field and wp_postmeta meta ID field to auto increment, using PhpMyAdmin. SOLVED MY PROBLEM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.