After migrating my website to Godaddy and having a new PHP version plus WordPress 5.2. Casting Data encountered many errors, like after fixing WordPress White screen of death. Logging in the WordPress Dashboard with an admin account, when trying to add new post or edit old post will show “Submit for a Review” instead of Publish.
First to make these things right, backup your website and database files:
- plugins conflict
- Repair table-prefix post
- Add auto increment key in your table-prefix
Mostly WordPress error cause of plugin conflict, to solve this rename the plugin folder to anything. If it solved the problem, then manually enable all your plugins and disable the plugin that causing the error.
Repair Table prefix
If plugins not causing the error, then try to repair the post table, in my case its castingdata_posts. Open your PHPmyadmin in your CPANEL and follow figure below:
See also: White Screen of Death error
Clicking your database in your PHPmyadmin will lead you to figure below:
After clicking table-prefix post in which castingdata-post on my end, it will lead to image below.
Click, Repair table on the drop-down.
If the above does not solve the problem, then you should follow step 3
Add Auto increment key in the table prefix post
Maybe an issue with the ID column for every post not properly auto incrementing, it may be caused by updating the WordPress version or migrating to new PHP version of your web hosting that cause the table to mess up.
See also: WordPress White screen of death
Make it sure you already backup your database to perform this process.
In the picture above, click the table with a prefix post in my case its castingdata_post, click the Structure column by doing below.
Click the save button
Click change and check the auto increment check box. “A I”.
If it will prompt with an error below:
ERROR 1062: ALTER TABLE table-name causes auto_increment resequencing, resulting in duplicate entry ‘1’ for key ‘PRIMARY’
Issue this command below in your PHPMYADMIN:
ALTER table table-name change column `ID` `ID` INT(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT = 14146
14146 any number that not yet existed in the previous post, like in my table,the last ID was 14145