Home › Forum › Problemi Vari con WP › LENTEZZA IMPRESSIONANTE SUL MIO BLOG
-
AutorePost
-
-
27 Agosto 2010 alle 9:58 #14859gherardo84Partecipante
Ciao a tutti, sono nuovo del forum ( e per certi aspetti anche per wp ) quindi se faccio domande magari stupide capitemi…
allora il mio problema è la eccessiva lentezza, il mio sito internet http://www.gierreti.it gestito con wp rel. 2.9.2 il tema da me utilizzato è mobipress con 0 widget attivi.
Sò benissimo che avete già trattato questo argomento ma dalle discussioni che ho visto non ho trovato soluzione.
I plug-in attivi sono in totale 22 e se ne avrete necessità ve li postero successivamente.
Ho provato ad installare plug-in come WP super cache e db cache per aumentare la velocità del mio sito ma nulla cambia.
Secondo il consiglio poi di Aruba ho ottimizzati e riparato i database ma anche facendo questo nulla cambia, tenete presente che sul pannello di controllo dell’sql mi viene visualizzata una grandezza del db di circa 500 mb.
Pensavo poi di aggiornare WP alla release 3.0.1 ma non so quanto questo mi possa aiutare.
Riuscite a darmi qualche consiglio?
una volta risolto questo problema avrò un’altra domandina…..
grazie a tutti
-
27 Agosto 2010 alle 12:54 #76603je92Partecipante
Quante tabelle hai nel database? 500 MB mi sembrano tanti…
Elimina i plugin superflui e assicurati che nel database non ci siano voci di plugin che non usi più, in caso eliminale.
Installa Autoptimize e per la cache prova DB Cache Reload. Se il tuo sito contiene molte immagini vedi se è il caso di ridurne il peso. Cmq mi sa che il problema è il peso eccessivo del database
-
27 Agosto 2010 alle 16:42 #76607gherardo84Partecipante
Innanzi tutto grazie per la velocità ….
Ho analizzato il database e faccio una piccola correzione, la somma di 500 mb era di due database, quello di http://www.gierreti.it è di 25 MB dei quali 13,7 MiB sono delle statistiche di Statpress.
In tutto ho 184 tabelle all’interno del database.
– Plug-in Inattivi: Cancellati
– Autoptimize 1.3: Installandolo tutto bene, quando tento di attivarlo: Il plugin non può venir attivato perché genera un errore fatale.
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /web/htdocs/www.gierreti.it/home/html/wp-content/plugins/autoptimize/classes/autoptimizeConfig.php on line 5
Aprendo il file sulla riga 5 ho: private $config = null;
– DB Cache Reload 2.1: Installato, ma una volta che tento di attivarlo: La cache non può essere attivata. Impostare i permessi per la cartella wp-content a 755.
Ho ovviamente impostato tutto a 755 ma nulla cambia.
Tenete presente che ho un altro sito molto grosso e molto trafficato che raggiunge i 250MB di grandezza e non ha alcun problema di velocità . Nella parte destra del sito sotto esame come potete vedere c’è il bottone “NEWS DAL BLOG” che si collega alle ultime notizie appartenenti a determinati tag di una alto blog (quello da 250MB per internderci).
-
27 Agosto 2010 alle 17:43 #76608je92Partecipante
A me quei due plugin vanno benissimo (però ho wordpress 3.0)
tornando al problema io personalmente eliminerei il plugin Statpress, ci sono tanti servizi esterni buoni per le statistiche (vedi google analitycs, woopra, statcounter, ecc..) che non appesantiscono il tuo server.
Poi controllerei il tuo sito qui
Avrai un’analisi dettagliata dei problemi del tuo sito e qualche consiglio su come risolverli. Può darsi che anche il supporto del tuo hosting ti dia qualche dritta.
Comunque una cosa non mi torna: io ho 19 plugin attivi e tabelle nel database mi pare 16. Tu con solo 22 plugin hai oltre 180 tabelle…non so ma a me i conti non tornano
-
28 Agosto 2010 alle 7:54 #76619AndreamkPartecipante
Il tuo sito ci mette 17.52 secondi a generare l’html.
Solo l’html quindi non centrano le immagini i banner o qualsiasi altra cosa.
Tieni conto che 17 secondi sono un tempo biblico non puo essere neanche il db. Anche se wordpress avesse la peggior ottimizzazione del mondo quei tempi non sono pensabili.
Mi verrebbe da chiederti se per sbaglio non hai inserito uno sleep da qualche parte per fare una prova …
Una volta a me capitò; andò in prodtuzione uno sleep ^^.
Tornando a noi per capire cos’e’ devi andare per esclusione.
Per prima cosa mutisciti di uno strumento che misura i tempi di caricaemtno della pagina come ad esempio firebug un plugin di firefox o il tool di sviluppo di chrome. La barra di caricamento che ti interessa è l’html le varie immagini e css non hanno problemi.
La cosa migliore per partire sarebbe quella di scaricarti tutto il sito in locale e verificare se ti da lo stesso problema o se no fai direttamente in produzione di notte
Comincia a disabilitare un plugin alla volta e ricarciare la pagina per verificare se ci sono miglioramenti.
Una volta isolato il problema vedrai che passi da 17 seocndi a 1.
—-
Parlando d’altro ho notato che nella stessa pagina includi 2 volte jquery la 1.2.6 e la 1.3.2. Questo è male molto male. Oltre al fatto che includi un macello di css e altre schifezze.
Bisognerebbe dargli una bella sistemata a quel sito
p.s. Gmetrix non funziona ci mette talmente tanto a generare l’html che va in timeout devi usare i plugin dei browser
-
28 Agosto 2010 alle 8:03 #76621je92Partecipante
Gmetrix non funziona
Funziona invece,a volte va in timeout ma è raro, e mi ha permesso di ridurre notevolmente il tempo di caricamento del mio sito.
cmq sarebbe utile sapere da quando il tuo sito va cosଠlento, immagino che non sia stato sempre cosà¬
-
28 Agosto 2010 alle 8:06 #76622AndreamkPartecipante
Non funziona con quel sito in particolare non era una considerazione generale.
Se non ci credi provalo va fisso in timeout perchè 17 secondi senza avere risposta sono troppi
Anche io l’ho usato per il mio ed è ottimo.
-
28 Agosto 2010 alle 9:13 #76623je92Partecipante
ok non avevo capito…anchio in effetti avevo provato con il suo sito e non andava ma credevo fosse un problema temporaneo o cosa del genere
-
30 Agosto 2010 alle 6:38 #76678gherardo84Partecipante
ok, ora provo a fare quello che mi avete detto… GRAZIE MILLE
il problema di base è questo, lo sviluppo iniziale di questo mio sito lo ha sviluppato un mio ex collaboratore ora lui non c’è più e a me tocca metterlo a posto…
però c’è da dire che non è mai stato veloce come sito, ma questo a dir la verità poco mi importava, ma ora che mi arrivano una marea di contatti da internet voglio velocizzarlo per migliorarne la fruibilità e la ricerca di contenuti.
Ora mi vien da pensare che sia uno script java che avevamo inserito tempo fà , era uno script che faceva uscire un allert alla prima connessione al sito internet, usciva una pubblicità e altro per intenderci.
ora cerco…
scaricare in locale?!?!?!?!? Magari….. ho easyphp che mi sta facendo impazzire, lo installo lo utilizzo ma se riavvio il pc non mi fà più entrare nel managment del database dandomi problemi di login… che balle……..
a presto ragazzi, se avete altri consigli… postate postate
-
30 Agosto 2010 alle 9:19 #76682gherardo84Partecipante
allora allora, ho scaricato db e sito in locale, risolto (spero definitivamente) problemuccio con easyphp e ora vi confermo che la lentezza è presente anche in locale.
ora però ho un altro piccolo problemino prima di poter procedere-…
dal locale se vado in wp-admin mi re-indirizza al sito internet pubblicato…
come faccio ad accedere al pannello di controllo in locale????
-
31 Agosto 2010 alle 13:20 #76736gherardo84Partecipante
vi aggiorno…
ho contattato anche aruba, dove è posizionato il sito, e mi ha consigliato di diminuire le dimensioni del db delle statistiche, cosଠho fatto… ma nulla cambia…
adesso il database è diminuito drasticamente di dimensioni ma non si è risolto il problema della velocità .
-
31 Agosto 2010 alle 15:02 #76740je92Partecipante
hai controllato immagini, componenti flash, ecc…? possono rallentare notevolmente se sono troppi o troppo pesanti. A questo punto prova plugin per comprimere CSS e Javascript, come WP-Minify, vedi se cambia qualcosa.
potresti anche provare a risolvere gli errori di validazione
Altrimenti potresti fare una prova del genere: installi wordpress pulito su uno spazio gratuito, tipo altervista, installi li stessi plugin e tema. Controlli come va. Poi importi l’attuale database, basta fare un backup, e rifai il test. Se dopo l’importazione del database va lento vuol dire che lui il problema. Se invece va tutto bene significa che c’è un problema nella tua attuale installazione. Reinstalla o prova ad aggiornare
-
31 Agosto 2010 alle 15:06 #76742gherardo84Partecipante
ciao je92 grazie per la pronta risposta…
una info wp-minify non fà danni vero????
per aggiornare wp inoltre volevo prima provare in locale ma non riesco proprio ad accedere al wp-admin in locale, mi si reindirizza al sito pubblicato, come posso fare? tutto il sito internet lo vedo in locale ma quando scrivo wp-admin mi butta sul sito pubblicato…
-
31 Agosto 2010 alle 15:10 #76743je92Partecipante
no wp-minify non fa danni, al massimo se hai plugin per il social bookmarking non li visualizzi correttamente, ma basta escludere il loro CSS nelle impostazioni del plugin. Per il locale non ti so dire
-
1 Settembre 2010 alle 6:46 #76747gherardo84Partecipante
che paura mi son preso….
ho installato WP-Minify attivato… e il sito si è sballato… avevo perso tutto il layout..
fortunatamente disattivandolo è tornato tutto ok….
ora ho fatto un pò di controlli con il tool di chrome e il risultato è stato che adesso con http://gtmetrix.com/ il sito mi viene visualizzato e mi vengono dati una serie di parametri & c… che però poco comprendo.. riuscite a darmi una mano???
sicuramente voi esperti riuscite a capirci qualcosa… grazie
-
1 Settembre 2010 alle 7:55 #76748AndreamkPartecipante
Ascolta , poi fa come ti pare, li non c’e’ un problema di DB non c’e’ un problema di file compressione di css nulla del genere. Questo perchè parliamo di tempi troppo lunghi per pernsare che sia un db troppo grande o uno script in flash.
Inoltre le componenti aggiuntive di una pagina vengono caricate dopo che il browser ha finito con l’html. E visto che il problema ce l’hai nella latenza enorme nel caricamento dell’html tutto il resto non centra una fava.
Installare ultieriori plugin non fa che complicare il problema.
La mia personale teoria è che hai due plugin che vanno inconflitto sulla stessa risorsa o uno sleep infilato per sbaglio da qualche parte.
Per escludere questa tesi devi disabilitare 1 plugin alla volta e ricaricare la pagina e verificare se il problema persiste cosi almeno escludiamo che siano i plugin o troviamo quale da problema.
Per sistemare wordpress in locale devi entrare nel db e cercare nella tabella wp_options (o il prefisso che hai inserito _options) le opzioni dove c’e’ la tua url che dovrebbero essere home , siteurl e modificare il valore con l’indirizzo l’url locale (es. http://localhost)
Andrea
-
2 Settembre 2010 alle 9:27 #76790gherardo84Partecipante
ciao e grazie per le risposte.
ho fatto quanto mi ha detto andrea, ma non riesco a sistemare il mio problema, ho addirittura provato a disabilitare tutti i plug-in presenti e il problema rimane… che cosa può essere?
dico anche che analizzando bene il sito ho eliminato delle imperfezioni di codice, inoltre ho tolto alcune funzionalità che non erano configurate al 100% e che non utilizzavamo molto ( e-commerce e livezilla)!!!!!
altre idee??????
-
2 Settembre 2010 alle 12:24 #76793AndreamkPartecipante
Ma i plugin li hai tolti online o in locale ?
E li hai solo disabilitati o proprio cancellati ?
Mi viene in mente un altra cosa … prova a cambiare template e metti quello base.
Anche nei template si possono effetturare parecchie operazioni.
-
2 Settembre 2010 alle 12:32 #76795gherardo84Partecipante
li ho disabilitati in locale!!! non vorrei fare qualche casino sul sito on line ora come ora…
adesso sto inserendo gli Expire Headers e disattivando gli ETags.
dopodichè vado a ridurre drasticamente le dimensioni dei file style.
in locale il template standard và che è una scheggia…
-
2 Settembre 2010 alle 12:37 #76796AndreamkPartecipante
ok quindi il problema lo hai nel template è già un passo avanti.
Potresti farti stampare a video in vari punti il tempo di esecuzione cosi vedi il punto dove si incasina …
Ma sei propo sicuro di non avere inserito uno sleep da qualche parte ?
-
2 Settembre 2010 alle 12:38 #76797gherardo84Partecipante
“Potresti farti stampare a video in vari punti il tempo di esecuzione cosi vedi il punto dove si incasina …” scusami ma non ti capisco cosa mi chiedi!!!!!
cosa intendi per sleep???
-
2 Settembre 2010 alle 12:43 #76798AndreamkPartecipante
Ops pensavo ne capissi un po di php.
sleep è una funzione php che ferma l’esecuzione del codice per il numero di secondi che gli passi.
Tipo se metto in mezzo al template
sleep(10);
Il tutto si ferma per 10 secondi quindi il sito diventa lentissimo.
Per il resto spiegartelo è un po un casino se sei a zero di programmazione.
Non saprei come aiutarti
-
2 Settembre 2010 alle 12:45 #76800gherardo84Partecipante
a zero non sono… tranquillo… è che mi serve un linguaggio un attimo meno tecnico…
di sleep non ce ne sono!!!!
-
2 Settembre 2010 alle 13:03 #76801gherardo84Partecipante
cavolo è proprio il caricamento dell’HTML che rompe…
http://tools.pingdom.com/fpt/?url=www.gierreti.it/&id=2865288
questa analisi l’ho appena fatta… vedendo questa anche se metto a posto stili & c la storia non cambia o sbaglio???
questa è l’analisi in sunto
Website information
Total loading time:
30 seconds
Total objects:
74 (908.6 KB)
External objects:
4 (47 KB)
HTML (X)HTML:
3 (73.1KB)
RSS RSS/XML:
0
CSS CSS:
13 (42.5KB)
Scripts Scripts:
18 (391.7KB)
Images Images:
40 (401.3KB)
Plugins Plugins:
0
Other Other:
0
Redirected Redirected:
1
ci impiega 25 secondi a caricarmi l’HTML?!?!?!?!?
-
2 Settembre 2010 alle 14:08 #76803je92Partecipante
Allora nel sito online prova a mettere momentaneamente il tema di default, se va normale significa che il problema è proprio nel tema!! quindi o ci metti mano o lo cambi, poi ti consiglio di avvisare di questa cosa anche lo sviluppatore.
Comunque ho scoperto perchè il plugin Autoptimize ti dava errore: necessita di PHP5..io con quello sono passata da 25 a 6 secondi per il caricamento…
—-
potresti anche provare questo, che riduce da solo il css del tema
-
2 Settembre 2010 alle 14:20 #76804gherardo84Partecipante
con il tema di default è veloce, quindi è il mio tema che da problemi… l’avevo immaginato….ù
che controlli potrei fare sul mio tema?
un’altra info… i vari analizzatori dei siti mi dicono di “Add Expires headers” ma cosa devo inserire nei .css ?????
-
2 Settembre 2010 alle 16:01 #76808SteveAglAmministratore del forum
Nei css nulla.. sono settaggi sistemistici.. mi sa al di la delle tue capacità … comunque nons ono quelli che influenzano i tempi se cambiando tema tutto va veloce si è il tema dire dove e come intervenire è praticamente impossibile occorre fare analisi, debug, inserire codice in vari punti del tema per capire se e dove si incrocchia.. insomma da quel che dici il tutto non è banalissimo da comprendere nemmeno con la macchina di fronte figuriamoci per intuizioni… ti occorre un buon sviluppatore WP che ci dia una occhiata e metta mano al tutto… che poi se il sito è commerciale son soldi ben spesi…
-
3 Settembre 2010 alle 8:24 #76836gherardo84Partecipante
allora, ci sto arrivando con calma…. il problema è: nella pagina principale index.php la prima riga mi và a prendere <?php get_header(); ?> omettendo questo il sito è una scheggia…
quindi presumo che il problema sia nella header…
peccato che header.php è un bel file corposo… mhmmmmm che scatole…..
AGGIORNAMENTO!!!!!
allora di questo header.php il problema sono i pulsanti che sono modificati tramite apposito script denominato script_pages.php, omettendo questo script il sito è ok, peccato che perdo i pulsanti a tendina posizionati sotto l’immagine in flash… azz azz
qualcuno ha voglia di analizzarmi uno script???e solo da 250 righe
-
3 Settembre 2010 alle 9:26 #76837gherardo84Partecipante
anzi 130 righe…
come vedete dal sito questo script mi crea il menu nel rapporto pagina padre/figlio..
c’è magari qualche altro script da poter utilizzare per ottenere lo stesso risultato???
questo è il php sotto esame:
[CODICE NON RICHIESTO ELIMNATO, SE PROPRIO VUI MOSTRARE IL TUO CODICE LEGGI USARE FORUM DI SUUPORTO E SEGUI LE ISTRUZIONI]
-
3 Settembre 2010 alle 15:07 #76854AndreamkPartecipante
Allora se un po ne capisci ti spiego come fare a capire cosa si incasina senza cancellare pezzi di codice.
allinizio del file metti
`
$startTime = microtime(true);
poi copi in giro la seguente linea
echo 'line:'.__LINE__.' sec '.number_format(microtime(true) - $startTime , 5 , '.', '')."n";
ti stampa i secondi trascorsi da quando hai settato startTime.
Se vuoi metterlo in vari file puoi aggiungere all’echo la variabile predefinita __FILE__
—
il forum mi cancella i tag html comunque alla fine della linea dell’echo aggiungi anche il br se no non ti va a capo e non ci capisci nulla. Se ti è comodo mettilo anche all’inizio della linea.
-
8 Settembre 2010 alle 9:42 #76967gherardo84Partecipante
RISOLTO: ho rifatto il menù in maniera statica e non dinamica come era prima.
GRAZIE A TUTTI per la pazienza!!!!!!
-
8 Settembre 2010 alle 22:36 #76984AndreamkPartecipante
Direi che ora è tutta un altra storia anche se rimane abbastanza lento. Cissa che combina quel template.
I misteri della vita
-
29 Settembre 2010 alle 6:58 #77304skyh4wkPartecipante
Salve, ho letto questa discussione ed anche io ho lo stesso problema…
Ho creato autonomamente un tema per wp 2.8.4, e mi sono reso conto che all’apertura il sito è molto lento, tra i 7 ed i 15 secondi, poi una volta caricata l’index va una spada… (il server su cui è hostato è aruba), ho notato questa cosa anche con diversi browser…
Ho fatto tutte le verifiche del caso, disattivato i plugin inutili ed uno alla volta, e ripulito il codice del tema seguento anche le indicazioni di gtmetrix (il punteggio attuale è 82% B, 90% A), unito tutti i css in un unico file, compresso con gzip, idem per i file .js, e sicuramente il sito si è velocizzato di molto, il tempo di apertura è sui 3 secondi di media, max 4.
Nonostante questo però ho notato che se passa qualche minuto ed il sito rimane inattivo (penso) alla nuova visita il sito risulta sempre lento ad aprirsi, 7/8 secondi, e non risco a capire il perchè… problema di mysql?? ho addirittura chiesto l’update a mysql 5.0 da parte di aruba, quindi non saprei… è come se sia lento a connettersi al db!
Pensare che ho eliminato quasi tutte le richieste di connesione al db nel tema, per evitare appunto interrogazioni inutili, come link dinamici, titolo del blog, rss ecc… lasciando solo quelle importanti!
Thanks!
ps: se volete fare una prova http://www.e-torricelli.it/wordpress
-
29 Settembre 2010 alle 8:17 #77305skyh4wkPartecipante
aggiungo che guardando bene su gtmetrix.com, il page load time all’apertura è alto 8-9 secondi, mentre il total load time molto piu basso 3-4 secondi!
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.