Last Updated 2021.02.06
Delete post revisions on schedule – WP Optimize
When you start a website in WordPress and post articles regularly, what accumulates is data called a "revision" of the underlying of the posted article. This revision is convenient because you can version the article before publishing it, and you can rewind it to a certain point when you make a mistake, but for each article that has been published, it is data that is only garbage and access to the database is slow and very disturbing. WP Optimize is a plug-in that safely and regularly deletes this revision to keep the database clean at all time.
When using this plugin, be sure to back up your WordPress database before using it. Also, make make the plug-in version always up-to-date, and don't use the old version. The reason is that you have direct access to a database, an important vault that stores WordPress data, so using an older version can break the correct data structure of WordPress. This WP Optimize is developed by the developers of the backup plug-in UpdraftPlus, so I think there is no problem with updates and safety. However, please set and use it at your own responsibility.
Install WP Optimize
Click the left menu "Plug-in" → "New" in the extra screen, go to the new addition screen of the plug-in, and enter "WP Optimize" in the plug-in search form. When you see the WP Optimize plugin, press the "Install" button to install the plug-in. When you're done installing the plug-in, "activate" it.
Wp Optimize database settings
Since the "WP-Optimize" menu has been added to the left menu of the management screen, click "WP-Optimize" → "Database" to go to the database settings screen. When you see the settings screen in the figure above, check the Enable scheduled clean-up and optimization (Beta feature) item enclosed in a red frame, select "Select Schedule Type (Default: Weekly)" to select the optimization schedule for the database you want to set. Check "Clean all post revisions". For other items, it is recommended to check for safety reasons. The purpose of this article is to clean the database by periodically deleting revisions of posts, so do not do anything else. Once you have the above settings, "Save Settings" and schedule a revision deletion of the database.
WP Optimize scheduling confirmation
Once you have set the scheduling for deleting revisions of posts in the previous paragraph, go to "Dashboard" from the left menu of the management screen. Then, click "WP-Optimize" on the left → "Database" to transition to the settings screen. This is once moved to the dashboard to see the saved settings reflected. After transitioning to wp optimize database settings screen, click the "Optimization" tab to display it. If it is "periodic cleaning enabled", the correct setting is reflected. The revision is now deleted in the scheduled settings.
WP Optimize image settings
The WP Optimize plug-in automatically uploads images and also adds the function of compressing image size. I think that this function is a function that is divided into useful people and those who are not.
This site uses eye-catching images and other images as appropriate using Photoshop in advance, so we would like to use them in images while uploading images. So I surrounded it with a red frame.
Turn off the Show compression meta-box on an image's dashboard media page.
Turn on the radio button "Prioritize retention of detailed information".
By setting the above settings, WP Optimize will not automatically compress the image when you "add media" from the post screen.
For information on image compression, see the link below.
It's an English article, but I think chrome's Japanese translation will help you understand most of the features and image compression specifications.