#42462 closed defect (bug) (invalid)
Deleting post revisions via database breaks revision display
Reported by: | johnalarcon | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.8.3 |
Component: | Revisions | Keywords: | close |
Focuses: | Cc: |
Description
I forgot to limit post revisions ahead of time via wp-config.php and ended up with a lot of revisions in the database. I deleted them with phpMyAdmin (dropped all rows in wp_posts where post_type was revision). Seemed fine.
Since I wanted to have 3 revisions max for each post, I added define('WP_POST_REVISIONS', 3); to wp-config.php and revisions resumed saving to the database.
However, the revisions are no longer accessible on the post-edit pages, nor are revisions an option in the Screen Options tab anymore.
To get it back to normal, I went to Dashboard > Updates and did a reinstall of WordPress core.
Not sure if this is a technically a bug since I deleted the revisions manually, but it was certainly unexpected, so I wanted to put it out there in case anyone else came across this.
Change History (5)
#1
@
7 years ago
- Summary changed from Deleting post revisions via database b to Deleting post revisions via database breaks revision display
#3
@
7 years ago
- Keywords reporter-feedback removed
After your reply, I did some further investigation and found that WP_POST_REVISIONS define in wp-config.php was being ignored entirely. This discovery led me to the real issue.
I had placed my defines for post revision and autosave interval at the bottom of the file. These directives don't work unless they're added before requiring wp-settings.php. Oof! I totally know this. Feeling a bit embarrassed here. The issue is moot. Thanks for your follow-up.
Unless a post has revisions, the screen options and links won't show up.
It sounds like in your case you simply hadn't saved the post since removing all the revisions, resulting in no revisions to actually link to.
Can you verify that upon deleting all from the database (FYI: You might want to check for orphaned postmeta rows now) and hitting save a few times with content changes that the Revisions links/options show up again?