How to use and optimize WordPress revised illustrations

Whenever you save a draft or update a published WordPress page or article, the content management system (CMS) automatically creates a revision. When enabled, this feature prevents you from losing important work. Unfortunately, over time, WordPress revisions may take up unnecessary storage space and eventually degrade the performance of your site. Fortunately for

, there are ways you can minimize the negative impact of these stored revisions on your site. For example, in addition to deleting, disabling, or restricting them, you can optimize your revision database.

in this guide, we will introduce you to the revised version of WordPress and how to use it. Then, describe how to use revised versions and prevent them from having a negative impact on your site.

  1. WordPress revision introduction
  2. WordPress revision problems
  3. where can I find the revision of WordPress
  4. how to restore to the old version in WordPress how to enable WordPress revision
  5. how to disable WordPress revision
  6. how to optimize the revision database in WordPress how to delete WordPress revision
  7. how to restrict revision in WordPress
  8. directory
  9. hides

WordPress revision is helpful to any site owner. They are used as backups that you can restore in the event of an unexpected outage, such as accidentally closing the browser tab or a power outage.

they also enable you to revert to older versions of the content. For example, you may know that the content of an article is not as good as it used to be, and you want to roll back some of the most recent changes.

How to use and optimize WordPress revised illustrations1

revisions are also useful when you have a team working on the content of your site. In addition to letting you see which articles / page edits have been made, the WordPress revision feature records the username and timestamp of these changes. This increases transparency and makes it easier for editors to collaborate. Problems with

WordPress revisions

if you do not manage them properly, WordPress revisions can have serious problems. In essence, the more pages and posts you add to the site, the more revisions it generates.

if you have a large Web site or make frequent changes, this can quickly lead to unnecessary database bloating. This is because each time a revision is created, an additional row is added to the

table of the WordPress database with a

value of

.wp_postthe larger your database, the more storage space it takes up. Unfortunately, this may slow down your site and lead to longer load times, thus hampering your site’s user experience and search engine optimization (SEO).post_typetherefore, it is important to learn how to control revisions in WordPress to your advantage. Whether you want to delete revisions completely, disable or restrict them, or optimize your revision database, you have many options. Where canrevisionfind revised versions of WordPress

before discussing the different ways you can use and change revision settings in WordPress, it’s important to know where to find them. On the editor screen of the article or page, go to the right menu and click the documents tab. If

enables revisions and makes changes, you will see the number of revisions under the status and visibility section.

WordPress revision tool

Click this button to access the revisions page, where you can view all saved edits and compare any two revisions side by side. You will see two columns: the previous version of the post or page on the left and the version of your choice on the right.

WordPress revision page

How to use and optimize WordPress revised illustrations2

you can use the revision slider to browse various restore points. The system highlights what is added (plus and green) or deleted (minus and red).

if you want to keep the existing version and return to the editor screen without making any changes, simply click the article title or the return to editor link at the top of the screen. How

How to use and optimize WordPress revised illustrations3

reverts to an older version of

in WordPress sometimes you may want to undo changes made in WordPress. When this happens, the WordPress revision allows you to do this quickly and easily.

by default, WordPress displays revisions of articles or pages sequentially. However, if you want to view or compare non-sequential changes, you can do so by selecting any two revision options at the top of the screen:

compare WordPress versions of the option

and then select the version to compare with. Whenever you finish viewing and comparing revisions, you can restore the old version by clicking restore this version.

reverts to the old version of

How to use and optimize WordPress revised illustrations4

in WordPress Please note that if you click this button, it will automatically restore the version you are comparing-the version displayed in the right bar of the revision screen.

How to enable WordPress revision

How to use and optimize WordPress revised illustrations5

in general, WordPress revision is enabled by default. However, depending on your managed service provider or the process used to install WordPress, this feature may be disabled. You or someone else on your team may have disabled it at some point.

anyway, if you want to enable revisions in WordPress, you can do so manually by editing the files in the root directory of the

site. You can do this through a secure File transfer Protocol (SFTP) client. After

finds and opens the file, search for the following line of code:

changes thewp-config.phpvalue to

. If

define('WP_POST_REVISIONS', false);

does not have such a line, please add the following contentfalse“/ * That’s all, stop editing!” where it saystrue“ABSPATH”

! Happy publishing. * / “:manually enable WordPress revised versionDon't forget to save the file.now, when you log back into WordPress, you should see that the revision feature is enabled. To make sure it is up and running, open the editor for any page or article, and then check the revision option under the documents tab. How

define('WP_POST_REVISIONS', true);

How to use and optimize WordPress revised illustrations6

disables WordPress revisions

instead, you may want to disable revisions in WordPress altogether. Keep in mind that you can also enable this feature and limit or delete revisions to minimize the amount of space they take up in your database. We will discuss how to do this in the next section.

however, if you find that this feature has no use or use, you can turn it off completely. To do this, edit the

file for your site using the same method we discussed above. The only difference is that the value should be set to

instead of

.wp-config.phpif you are not used to editingfalsefiles, you can also use lightweight plug-ins such as Disable Post Revision to disable revisions in WordPress. After installing and activating the tool, you can access it by going to the settings in the WordPress dashboard, gt; Writing: thetrueDisable Post Revisions plug-in Settings

selects the type of article for which you want to disable revisions, and then save the changes. Howwp-config.phpoptimizes the revision database in WordPress

How to use and optimize WordPress revised illustrations7

the longer you run the site, the more revisions you are likely to store in the database. If you spend years updating and editing your content, you will naturally accumulate many revisions.

for example, if you have an older site, it is not uncommon to have more than 100 revisions on the oldest or frequently updated pages. Suppose you have 800 pages and articles on your site. If each of them has 100 revisions, the number of entries in the database exceeds 80000. This is also a common problem in WooCommerce stores. This accumulation of

may happen quickly and behind the scenes. Fortunately, in addition to completely disabling revisions, there are some ways you can optimize WordPress revisions. These include:

deleting WordPress revision

restricting WordPress revision

in the following sections, we will show you how to perform each of these tasks manually and using plug-ins.

  • if you are working on a new site, you can skip to the section on restricting WordPress revisions in the next section, because you won’t have any existing ones to delete. However, if your existing site has been up and running for some time, it is worthwhile to clean up your revisions to remove any unused or outdated revisions. How
  • removes WordPress revisions

you can remove revisions from your site either manually or through plug-ins. We recommend using the plug-in because it is faster and does not require you to modify the files of the site.

however, if you are a developer and want a more advanced approach, you can also delete the revision manually. We will discuss these two methods below. How to use plug-ins to delete WordPress revisions

if you want to use plug-ins to delete revisions in WordPress, there are several options to choose from.

We recommend using WP-Sweep.

WordPress plug-in-WP-Sweep

WP-Sweep is a free and easy-to-use tool that allows you to quickly and easily clean up older versions of your database. To install it, navigate to the plug-in in the WordPress dashboard, the gt; installation plug-in. Search for the plug-in, then select install and enable now:

enable WP-Sweep plug-in

next, navigate to the tool & gt; Sweep:

How to use and optimize WordPress revised illustrations8

finds the WP-Sweep plug-in setting

in WordPress. On this screen, you will see a list of revisions and the total number of existence. If you click Details, you can access a list of articles that will be affected.

How to use and optimize WordPress revised illustrations9

WP-Sweep plug-in screen

once you have viewed this information and determined that no important information will be deleted, click the “Sweep” button. Repeat this process for each item in the list. When you “browse” your revisions, a dialog box displays the number of revisions being processed.

How to use and optimize WordPress revised illustrations10

uses the WP-Sweep plug-in to handle the revised WordPress

. Note that for performance reasons, this plug-in displays only 500 projects at a time. If you have an older site, you can expect to list more revisions than in our example, because we used a test site in this demonstration. How

How to use and optimize WordPress revised illustrations11

manually deletes WordPress revisions

you can also delete WordPress revisions manually. There are two ways to do this: with the help of plug-ins, or by deleting entries directly from the database. We recommend using the second approach only if you are a developer and want to avoid installing other plug-ins.

How to use and optimize WordPress revised illustrations12

for the first method, download and enable the free Simple Revisions Delete plug-in. It does not manage or set up pages. To use it, visit the page / article editor, and you’ll find a Delete link next to each revision.

Using the “Simple Revisions Delete” plug-in

, you can now validate and manually delete unwanted revisions. This is a good solution for micromanaging your revisions.

if you prefer the second and more advanced approach, you can continue by visiting phpMyAdmin and running the SQL query. It is important to use this method carefully. There are many wrong code snippets in the WordPress plug-in library forum. Some of them may end up removing important content from your site. Or worse, they can shut down your site completely.

to safely delete later revisions in WordPress by querying, log in to your phpMyAdmin account, select your WordPress database from the left panel, and then click the SQL tab. The SQL tab

How to use and optimize WordPress revised illustrations13

in

phpMyAdmin, you can then enter commands that run on the WordPress database. In the command box, enter the following:

DELETE FROM wp_posts WHERE post_type= “revision”;

you need

How to use and optimize WordPress revised illustrations14

to replace with anything you use as a prefix for the WordPress database. Then click Go to run the command. Any revisions you have in the database will now be deleted.

if you are a WordPress developer, another option you may like is to use WP-CLI to delete your article revisions. Here is an example of the WP-CLI command you can use:

you can read more about the

command in the WP-CLI documentation.wp_remember that removing old revisions from the database does not prevent WordPress from creating historical versions of future pages and articles. Therefore, it is a smart idea to limit the number of revisions saved so that they do not get out of control and move on. How

restricts revisions in WordPress

$ wp post delete $(wp post list --post_type='revision' --format=ids)

you can minimize the frequency of database cleanup by limiting the number of WordPress revisions you allow. Just like deleting the WordPress revision, you can do this manually or by using the plug-in. Howwp post deleteuses plug-ins to restrict WordPress revisions

if you prefer to use plug-ins to limit WordPress revisions, you can use the free WP Revisions Control plug-in. This plug-in enables you to limit the number of WordPress revisions or disable them altogether. Once

is installed and enabled on your site, you can set the limit on the number of revisions for articles and pages by navigating to the settings behind WordPress & gt; Writing:

WP revision Control Settings

next, set the number of revisions for each article type. If you have any custom article types, you can also view the listed content here.

there is no limit to the number of revisions you can set. On the other hand, setting it to

completely disables article-type revisions. When you are finished, click the Save changes button at the bottom of the screen and you are ready to begin. How

How to use and optimize WordPress revised illustrations15

manually restricts revisions in WordPress to manually set the revision limits that you allow in WordPress, you can edit the code in the

file. As we mentioned earlier, depending on your host, you can do this through the cPanel and file manager or the SFTP client. After

opens the0file, add the following line of code:

We used a sample value of

above, but you can change this number to reflect the number of revisions you want the database to store in each page or article. Please save the file when you are finished, and then upload it to the server again.wp-config.phpSummary the revised version of

WordPress is a useful feature to prevent you from losing your job. They make it easier to restore older versions of pages and articles. However, when you have a large or complete site, revisions quickly accumulate and add unnecessary expansion to your database. As a result, they may eventually damage the performance of your site.wp-config.phpyou can change the way your site handles revisions in a number of ways so that they don’t have a negative impact on your site. This includes:

define('WP_POST_REVISIONS', 3);

disables the revision feature by editing the site3file.

manually removes individual revisions, such as Simple Revisions Delete, through plug-ins. Either delete revisions in bulk from the database directly through phpMyAdmin or WP-CLI, or use plug-ins such as WP-Sweep.

restricts revisions in WordPress by editing

files or using free plug-ins such as WP Revisions Control. The performance of the

  1. WordPress website depends on its database. If it’s time to optimize, optimize it!wp-config.php文件禁用修订功能。
  2. 通过插件手动删除单个修订,例如Simple Revisions Delete。或者通过phpMyAdmin或WP-CLI直接从数据库中批量删除修订,或者使用WP-Sweep等插件。
  3. 通过编辑wp-config.php文件或使用免费插件(例如WP Revisions Control )来限制WordPress中的修订版本。

WordPress网站的性能取决于其数据库。该优化就优化吧!

Disclaimer: All articles on this website, unless otherwise specified or marked, are original and published on this website. Any individual or organization is prohibited from copying, stealing, collecting, or publishing the content of this site to any website, book, or other media platform without the consent of this site. If the content on this website infringes on the legitimate rights and interests of the original author, you can contact us for assistance.