MENU service case
 Website construction website design Beijing website construction high-end website production company Shangpin China
We create by embracing change
360 ° brand value__
simplified Chinese character
Simplified Chinese English

Shangpin China Joins Hands with Beisheng Internet to Create a New Chapter in Website Construction

Type: Shangpin Dynamic Learn more

How to delete a draft automatically saved by wordpress

Source: Shangpin China | Type: website encyclopedia | Date: June 27, 2012
Website production Service provider Shangpin China: Students who use WordPress may have found that the ID of your articles is discontinuous. Why is this? The reason is that wordpress has the function of automatically saving drafts and revisions, so that every time it saves, a corresponding ID will be generated, and a large number of garbage files will be generated in the database.

Today I will talk about the method of cleaning up the database garbage files. It should be reminded that no matter which method you use, you should first make a data backup.

The first method is to delete directly in the database with SQL statements

There are many tables in the database, of which "wp_posts" is used to save all the relevant information of your articles. It is very important, and it generally stores the most data. We also clean the automatically saved drafts and revisions here. The command is as follows:

DELETE FROM wp_posts WHERE post_status!=’ publish’ OR post_type=’revision’;

In fact, WordPress's functions of automatically saving drafts and retaining revisions can be disabled directly. However, I heard that the plug-ins in the new version have failed. The only way left is this code, which is troublesome to operate. So I'd better clean it every once in a while.

The second method is to use the "WP Cleaner" plug-in

Download the blog plug-in WP Cleaner and upload it to the wp content/plugins/directory; Log in to the blog background and enable the plug-in in the list of installed plug-ins; After enabling the WP Cleaner plug-in, the "WP Cleaner" option will be generated under the "Settings" tab; Click the "wp cleaner" option to enter the plug-in interface; The available deletion options are "Delete All Revisions", "Delete All Drafts", "Delete All Revisions and Drafts", and "Delete All Revisions - Inherit". You can click whichever item you want to delete. This article was published by Beijing Website Construction Company Shangpin China //ihucc.com/
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).
TAG label:

What if your website can increase the number of conversions and improve customer satisfaction?

Make an appointment with a professional consultant to communicate!

* Shangpin professional consultant will contact you as soon as possible

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]

Communicate with professional consultants now!

  • National Service Hotline

    400-700-4979

  • Beijing Service Hotline

    010-60259772

Please be assured to fill in the information protection
Online consultation

Disclaimer

Thank you very much for visiting our website. Please read all the terms of this statement carefully before you use this website.

1. Part of the content of this site comes from the network, and the copyright of some articles and pictures involved belongs to the original author. The reprint of this site is for everyone to learn and exchange, and should not be used for any commercial activities.

2. This website does not assume any form of loss or injury caused by users to themselves and others due to the use of these resources.

3. For issues not covered in this statement, please refer to relevant national laws and regulations. In case of conflict between this statement and national laws and regulations, the national laws and regulations shall prevail.

4. If it infringes your legitimate rights and interests, please contact us in time, and we will delete the relevant content at the first time!

Contact: 010-60259772
E-mail: [email protected]