Home › Forum › Amministrazione WP › Eliminare le Revisioni senza arrecare danni o instabilità
-
AutorePost
-
-
11 Settembre 2012 alle 10:29 #22549kikkokawaPartecipante
Salve a tutti,
Vorrei, cortesemente, un aiuto per quanto riguarda l’eliminazione SICURA delle revisioni.
immagino questo discorso sia già stato affrontato essendo piuttosto comune, però scusatemi ma non riesco a capire dove è la funzione “cerca”.
ho trovato invece l’argomento affrontato su altri blog/siti.
Io vorrei poter eliminare di tanto in tanto le miriadi di revisioni che wordpress mi crea all’infinito.
Sono uno che aggiorna spesso e fa molte prove e mi si crea una lista insensata di revisioni.
Il punto però è che ho letto che questa operazione di eliminazione può creare diversi problemi e instabilità . Ho letto di plug-in che funzionano maluccio.
Oppure ho letto di funzioni del database da applicare in phpmyadmin. Alcuni dicono che funzionano bene, altri che creano un sacco di connessioni rotte ( non so cosa intendessero ).
Io salvo e backuppo spesso il mio sito e il mio database. Però questo non basta. Se dovessi ripristinare il sito e il database, wordpress mi perde comunque quasi tutti gli widget e molti plug-in importanti.Dovrei rifare metà del lavoro.
Per questo sono un po’ preoccupato nell’eseguire un operazione simile (eliminare le revisioni).
Mi chiedo e vi chiedo quindi, se esistano operazioni sicure da eseguire in tal senso. Vorrei ogni tanto poter eliminare tutte le revisioni senza la paura di distruggere il database. E’ possibile ?
Vi ringrazio. Buona giornata !
KK
-
11 Settembre 2012 alle 10:49 #97459wollyAmministratore del forum
La funzione cerca è sulla destra dove c’è la casella “ricerca”.
Per prima cosa modifica il tuo wp-config con le opzioni che preferisci seguendo questa guida http://codex.wordpress.org/Editing_wp-config.php#Post_Revisions
Poi installi un plugin tipo delete revision.
Non so e non volgio sapere chi ha scritto che eliminare le rivisione rende instabile WordPress, di cazzate su WordPress ne scrivono a tonnellate.
La tua politica di fare continui backup E’ OTTIMA!.
Prima di agire sul db con il plugin per eliminare le revisioni, backup.
-
11 Settembre 2012 alle 10:58 #97460TittiModeratore
Eliminare o tenere le revisioni non cambia le prestazioni di WP, lo scopo unico di eliminare le vecchie revisioni è solo quello di alleggerire il database, e non c’è neppure influenza sulla velocità di caricamento del sito, come ogni tanto si legge (le vecchie revisioni vengono caricate solo nell’articolo singolo dal lato admin).
Il plugin delete revision sarà ancora funzionante se è Wolly a consigliartelo, però sappi che puoi semplicemente lanciare tu direttamente nel database con phpMyAdmin questa query, e ti eliminerà tutte le vecchie revisioni:
DELETE FROM wp_posts WHERE post_type = “revision”;
Ovviamente prima backup anche in questo caso
-
11 Settembre 2012 alle 12:20 #97461kikkokawaPartecipante
Salve !
Grazie Mille per le risposte.
( Ho trovato il “cerca”, in effetti non era cosi difficile. )
Rispondo prima a Titti:
Il sistema da te consigliato è quello che in effetti volevo applicare, ma poi ho letto questo articolo:
http://www.duechiacchiere.it/2372/cancellare-le-revisioni-in-wordpress
Ed è quello di cui parlavo all’inizio, che può creare problemi al database. E’ vero quello che dice questo blogger ?
Grazie molte comunque, è la soluzione che volevo adottare ma sono appunto in attesa di saperne di più.
Rispondo a Wolly:
Grazie per la guida, pensavo effettivamente di cancellare quelle vecchie e poi mettere un numero limite di revisioni.
Per quanto riguarda i problemi dati dall’eliminare i post intendevo quello che ho letto nel blog che ho allegato sopra a Titti.
E ho letto male di qualche plug-in.
Adesso con calma valuto che funzione usare. Se il comando datomi da Titti effettivamente si muove come dice l’articolo, forse mi conviene provare il plug-in che mi hai consigliato.
Noto però che tutti mi consigliate di backuppare prima di fare questa operazione. Può essere davvero cosi rilevante ?
Grazie davvero ! e a presto
KK
-
11 Settembre 2012 alle 13:11 #97462TittiModeratore
Conosco il titolare di quel blog come un bravo sviluppatore di plugin, e sicuramente conosce meglio di me il database dato che ci lavora. So che esistono varianti sulla query per fare pulizia delle revisioni (e relativi meta) sul database, e non penso che quella consigliata da due chiacchiere sia sbagliata. Quella che ti ho scritto io poco sopra è semplicemente quella che ho usato io tempo fa, e non ho avuto nessun danno, perché poi l’articolo non dice che crea problemi e instabilità , ma “pulendo solo quella tabella, farai ancora più casino, lasciando un bel mucchio di relazioni spezzate”. Che sia vero o no non lo so, comunque non l’interpreto come “danni al database”, ma solamente come “lasciar sporcizia”. A occhio, direi che nulla vieta di mettere in pratica anche quella nel caso si fosse già fatta l’altra, infatti alla fine consiglia il controllo con un altro comando.
Il backup è importante in quanto, in caso di danni al contenuto del database, puoi ripristinarlo esattamente com’era prima.
P.S.: la modifica nel wp-config la puoi far subito e indipendentemente dalla cancellazione delle vecchie revisioni
-
11 Settembre 2012 alle 13:24 #97463wollyAmministratore del forum
utilizzando quella query non crei danni solo che lasci tutte le informazioni in postmeta, meglio usare un plugin che cancella da tutte e due le tabelle posts e postmeta.
Non succede nulla a non cancellarle da postmeta rimane solo il database con dati inutili.
duechiacchiere è un ottimo blogger e tecnico che conosco molto bene le sue istruzioni sono corrette.
P.S: quando si lavora sul database è sempre buona norma fare un backup cosଠse per caso qualcosa va stroto non perdi nulla.
-
11 Settembre 2012 alle 13:35 #97464kikkokawaPartecipante
Dopo le vostre risposte ho letto più approfonditamente il blog di duechiacchiere.
Se ho ben capito utilizzare il suo sistema ( il primo paragrafo di codice che propone ) dovrebbe ripulire anche tutte le varie relazioni.
I codici successivi sono a parte, e servono solo per effettuare un controllo.
Nei commenti invece parlano anche molto bene del plug-in “delete-revision” che mi hai consigliato tu Wolly, però non si capisce se fa il lavoro di ripulire tutto.
Da quel che mi dici dovrebbe farlo giusto ? O ho capito male…
Grazie molte comunque per l’aiuto datomi finora, molto prezioso.
Per quanto riguarda duechiacchiere, devo aver interpretato io male quello che intendeva col fatto di fare casino.
-
11 Settembre 2012 alle 13:42 #97465wollyAmministratore del forum
Si delte revision cancella tutte le relazioni, in pratica fa quello che fa la query JOIN di duechiacchiere.
-
11 Settembre 2012 alle 13:49 #97466kikkokawaPartecipante
Ottimo !
Non essendo io per nulla esperto nell’uso di phpmyadmin o di database ( salvo cose classicheggianti come esportare, importare… ) penso di rivolgermi al plug-in consigliatomi da Wolly. ( grazie wolly ! )
Probabilmente è più sicuro rispetto al farmi mettere le mani sul database di persona.
Grazie moltissime anche a Titti per le sue informazioni molto utili, e a duechiacchiere che non è presente.
Vi farò sapere come è andata !
Grazie ancora e buona giornata !
KK
-
11 Settembre 2012 alle 21:20 #97467kikkokawaPartecipante
Bene !
Fatto cosà¬:
1) Backup Totale
2) Usato il plug-in consigliato da Wolly
– installato, attivato
– eseguito ricerca
– eseguito cancellazione ( intorno alle 718 eliminazioni )
3)Verificato che su wordpress abbia funzionato e sia tutto integro: affermativo ( o almeno cosi pare )
4) Utilizzato la query di verifica di DueChiacchiere e il database mi ha restituito ZERO righe.
Quindi direi che ha funzionato perfettamente e come previsto. Sono molto contento !
Vi ringrazio davvero molto. Ho risolto il problema.
Ne approfitto per un ultima domanda: il plug-in ha un ulteriore funzione : “optimize database” a cosa serve ? è consigliabile ?
Grazie ancora !
Buona serata
KK
-
11 Settembre 2012 alle 22:10 #97469TittiModeratore
Farà la stessa cosa che fa anche PhpMyadmin, cioè compatta i buchi lasciati dalle cancellazioni ordinarie e straordinarie di una normale gestione del sito. Consigliato, sଠmolto.
-
12 Settembre 2012 alle 9:22 #97474kikkokawaPartecipante
Ah bene !
Farò girare anche quella funzione allora. Ottimo plug-in.
Grazie ancora ad entrambi.
Happy day !
KK
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.