WordPress Error: Can’t add custom fields

< 1 min read
Reading Time: < 1 minute

If, when trying to add a custom field to a post, you get the following message:

Please provide a custom field value

This message is misleading. It’s the AJAX javacript generated error message which is not customized for database errors.

So potentially you have a bit of a nasty problem: database corruption.

You may now notice some other problems with your wordpress like missing thumbnails in your media library. It’s ugly.


1. Go to your website cpanel and run phpMyAdmin
2. Open your wordpress database
3. Find the table wp_postmeta – if you have set your table up with a prefix, adjust the instructions below accordingly

At this point if you find a warning message saying it has crashed, you are in luck. Otherwise, you need to surf for another solution…


4. Open the SQL tab for wp_postmeta table
5. type REPAIR TABLE wp_postmeta and hit Go

That should be it. Other crashed tables can be repaired in the same way.