Home Uncategorized Turning off the ‘revisions’ feature in WordPress!

Turning off the ‘revisions’ feature in WordPress!

0
Turning off the ‘revisions’ feature in WordPress!
Turning off the 'revisions' feature in WordPress!

This feature, which comes with

WordPress 2.6, is an unwanted feature by most people, although it sometimes saves lives.. I want to talk about this feature briefly.. Thanks to the Post Revisions feature, it automatically saves the text version at regular intervals while you are writing your article and every time you save it.. So, when you encounter any error, you can go back to your post a few minutes ago.. However, this is not preferred by most users as it inflates the DB quite a bit.. Paste the code below into the “wp-config.php” file among your WordPress installation files.
define( ‘AUTOSAVE_INTERVAL’, 600 );
define (‘WP_POST_REVISIONS’, 0); After pasting these codes, upload the file back to your server. Your post versions will no longer be saved when typing in WP. So your DB won’t inflate unnecessarily>. However, if you have been using this feature for a long time and have now turned it off; you need to delete previously saved versions of post. For this, you must enter your site panel.. This will differ for some of you as CPanel, for others as Plesk or a different panel. After logging into the panel, you must enter “PhpMyAdmin“. Click the SQL button just below the PhpMyAdmin logo in the upper left corner of the page that opens.. A window opens where we can write a SQL query.. Just paste the codes below and click the “GO” button.

DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = ‘revision’ If our SQL query ran, it tells us about the number of rows deleted. If it didn’t work you’ll get an error. This error may be caused by the ‘revision’ text in quotation marks at the end of the code.. Try deleting the quotes and writing it yourself.

What is Whatsapp contract? And what are the ingredients?

LEAVE A REPLY

Please enter your comment!
Please enter your name here