Subscribe to RSS feed Subscribe to RSS feed or vai follow me sekojiet man on Twitter? par čivināt?
WordPress introduced post revisions in v2.6. WordPress iepazīstināja post pārskatījumi v2.6. It has been useful for multi-author blogs (and individual bloggers who revise posts several times before publishing), as they can compare revisions of their post and choose from them for publishing. Tā ir noderīga vairāku autoru blogus (un individuālo Emuāru autori, kuri pārskatīt amatu vairākas reizes pirms publishing), jo tie var salīdzināt revisions to post un izvēlēties kādu no tās publicēšanu. For most, however, this feature does not help much. Vairumam, tomēr šī iespēja nepalīdz much. In fact, I wouldn't be surprised if you didn't notice such a feature at all. Patiesībā, es nebūtu pārsteigts, ja neesat paziņojums šāda īpašība vispār.
The unfortunate side effect of post revisions is that it bloats the database. Nelaimīgais pusē spēkā pēc pārskatīšanas ir tas, ka tā bloats datubāzē. For each edit / revision of a post, a new row is made in wp_posts table in your blog's MySQL database. Par katru rediģēt / pārskatīšana amatā, jauna rinda tiek veikts wp_posts galda jūsu emuāra MySQL datu bāzi. For blogs with daily (or more frequent) posts, post revisions can increase the size of your DB greatly. Par blogus ar dienā (vai biežāk) amatu, post revisions var palielināt jūsu BP ļoti.
Look at the screenshot of results after I deleted post revisions on this blog below. Paraugieties uz screenshot rezultātu pēc I svītrots post revisions par šo emuāru turpmāk. Note that I delete post revisions frequently, else the number of rows deleted would have been greater. Ievērojiet, ka es izdzēšu post revisions bieži cits skaitu rindas svītro būtu bijis lielāks. You can imagine how large it will be for blogs which have never had their post revisions deleted. Jūs varat iedomāties, cik liela tā būs blogi, kas nekad nav bijusi to post revisions svītro.


How to remove post revisions in WordPress database Kā noņemt post pārskatījumi WordPress datubāzē
Thanks to the power of MySQL, you can remove all post revisions with a single command. Pateicoties varu MySQL, varat noņemt visus post revisions ar vienu komandu. Login to phpMyAdmin(or similar) and click to get into your WordPress database. Login to phpMyAdmin (vai līdzīga) un noklikšķiniet uz, lai iegūtu savā WordPress datubāzē. Then click SQL tab, and paste the code below to the SQL command box: Pēc tam noklikšķiniet uz SQL tab, un ielīmējiet kodu zemāk, lai SQL komandu kastē:
DELETE FROM wp_posts WHERE post_type = "revision"; Dzēst no wp_posts KUR post_type = "pārskatīšanu";
This should remove all post revisions. Tas būtu jālikvidē visas pastu pārskatīšanu. As with any other database manipulation commands, make sure to back up your database before running it. Tāpat kā jebkurš cits datu bāze manipulācijas komandas, pārliecinieties, lai dubl Jūsu datubāzē, pirms rādīt to.
Related reading Saistītās lasījumā
- Disable / turn off post revisions in WordPress Disable / izslēdziet post pārskatījumi WordPress
- Cleano: delete Windows temporary files Cleano: Delete Windows pagaidu failus
- How to remove / delete / erase files permanently on Windows Kā noņemt / delete / dzēst failus pastāvīgi uz Windows
- I've switched to Ubuntu Linux – post your tips here Esmu pārslēdz uz Ubuntu Linux - pēc jūsu padomus šeit
Didn't work for me. Nestrādāja par mani.
Error Kļūda
SQL query: SQL query:
DELETE FROM wp_posts WHERE post_type = “revision†Dzēst no wp_posts KUR post_type = â € œrevisionâ €
MySQL said: MySQL teica:
#1054 – Unknown column '“revision†# 1054 - Unknown slejā "à ¢ â, ¬ Å" revisionà ¢ â, ¬