Avete bisogno di risolvere l’errore di caricamento delle immagini HTTP in WordPress?
Questo errore può essere particolarmente frustrante quando si creano contenuti in WordPress. Di solito si verifica quando si carica un’immagine o altri file nel CMS utilizzando la libreria multimediale integrata di WordPress.
In questo articolo vi mostreremo come risolvere facilmente l’errore di caricamento delle immagini HTTP in WordPress.
Cosa causa l’errore HTTP durante il caricamento dei file multimediali in WordPress?
Molte cose possono portare a un errore HTTP quando si cerca di caricare file sul proprio sito WordPress utilizzando il media uploader di WordPress.
In pratica, WordPress non è in grado di capire la causa ed è per questo che visualizza il messaggio generico “errore HTTP”.
L’aspetto frustrante di questo errore HTTP di WordPress è che non fornisce alcun indizio su cosa possa averlo causato. Ciò significa che dovrete provare diverse soluzioni per trovare la causa e risolvere l’errore.
Detto questo, vediamo come risolvere i problemi e risolvere l’errore HTTP durante il caricamento dei media in WordPress. Sentitevi liberi di usare i link sottostanti per passare a un metodo specifico:
Metodo 1: Assicurarsi che l’errore HTTP non sia temporaneo
Per prima cosa, dovreste aspettare qualche minuto e poi provare a caricare nuovamente il file immagine sul vostro sito WordPress. Questo errore è talvolta causato da un traffico insolito e da scarse risorse del server, che vengono risolte automaticamente sulla maggior parte dei server di hosting WordPress.
Se non funziona, si consiglia di provare uno o più dei seguenti metodi:
- Aggiornare il browser o cancellare la cache del browser.
- Ridimensionare e rinominare il file e caricarlo nuovamente nella libreria multimediale. Consultate il nostro elenco di plugin per l’ottimizzazione delle immagini per ridurre le dimensioni dei file.
- Salvare il file in un formato diverso. Ad esempio, è possibile cambiare JPEG in PNG utilizzando un software di editing di immagini. Dopodiché, provare a caricare nuovamente il file.
Se seguendo tutti questi passaggi si ottiene comunque l’errore HTTP, allora l’errore non è causato da un problema temporaneo e richiede sicuramente un’attenzione immediata.
Metodo 2: Disattivare tutti i plugin di WordPress
Se avete installato di recente un nuovo plugin di WordPress, è possibile che sia incompatibile con gli altri plugin e che interrompa il processo di caricamento delle immagini. Per verificare se questo è il caso, è possibile disattivare tutti i plugin di WordPress.
Se l’errore HTTP scompare dopo aver disattivato un plugin di WordPress, allora potrebbe essere il colpevole dell’errore HTTP di caricamento dell’immagine. È possibile installare un plugin alternativo o contattare lo sviluppatore per ottenere assistenza.
Per ulteriori informazioni, consultate la nostra guida su come disattivare facilmente tutti i plugin di WordPress e su come disattivare i plugin quando la dashboard di WordPress è inaccessibile.
Metodo 3: Aumentare il limite di memoria di WordPress
WordPress è scritto nel linguaggio di programmazione PHP. Inoltre, la quantità di memoria allocata per i diversi processi PHP è determinata dal server di web hosting.
Se il caricamento delle immagini richiede una quantità di memoria PHP superiore a quella disponibile, è possibile che venga visualizzato l’errore HTTP di caricamento delle immagini in WordPress.
Per risolvere questo problema, è necessario aumentare la memoria che PHP può utilizzare sul server.
Per prima cosa è necessario accedere ai file del sito utilizzando un client FTP o l’applicazione File Manager nella dashboard del proprio hosting web. Quindi, andare nella directory principale e trovare il file wp-config.php.
Sarà quindi necessario modificare il file wp-config.php con un editor di testo e aggiungere la seguente riga di codice:
define( 'WP_MEMORY_LIMIT', '256M' );
Questo codice aumenta il limite di memoria di WordPress a 256 MB, il che sarebbe sufficiente a risolvere qualsiasi problema di limite di memoria.
Infine, è necessario salvare e caricare il file sul server.
Per saperne di più, consultate la nostra guida passo passo su come aumentare il limite di memoria PHP in WordPress.
Metodo 4: Cambiare la libreria dell’editor di immagini utilizzata da WordPress
WordPress si basa su PHP, che utilizza due moduli per gestire le immagini. Questi moduli si chiamano GD Library e Imagick. WordPress può utilizzare uno dei due, a seconda di quale sia disponibile.
Tuttavia, Imagick ha spesso problemi di memoria che causano l’errore HTTP durante il caricamento delle immagini. Per risolvere il problema, è possibile rendere GD Library l’editor di immagini predefinito.
È possibile farlo semplicemente aggiungendo questo codice al file functions.php del proprio tema WordPress o utilizzando WPCode (consigliato):
function wpb_image_editor_default_to_gd( $editors ) {
$gd_editor = 'WP_Image_Editor_GD';
$editors = array_diff( $editors, array( $gd_editor ) );
array_unshift( $editors, $gd_editor );
return $editors;
}
add_filter( 'wp_image_editors', 'wpb_image_editor_default_to_gd' );
Per maggiori dettagli, potete consultare la nostra guida su come aggiungere codice personalizzato in WordPress.
Dopo aver aggiunto questo codice, è possibile riprovare a caricare i file utilizzando il caricatore multimediale. Se questo non risolve il problema, è possibile rimuovere il codice e provare altri metodi descritti in questo articolo.
Metodo 5: utilizzare il metodo .htaccess
Questo metodo consente di controllare il modo in cui Imagick utilizza le risorse del server. Molti provider di hosting condiviso limitano la capacità di Imagick di utilizzare più thread per velocizzare l’elaborazione delle immagini. Tuttavia, questo comporta la visualizzazione di un errore HTTP durante il caricamento delle immagini.
Una soluzione semplice consiste nell’aggiungere il seguente codice nel file .htaccess:
SetEnv MAGICK_THREAD_LIMIT 1
Questo codice limita semplicemente Imagick a utilizzare un singolo thread per elaborare le immagini.
Metodo 6: Aggiornare la versione di PHP
Se il vostro sito WordPress utilizza una versione obsoleta di PHP, potrebbe causare l’errore di caricamento delle immagini HTTP. Questo perché le nuove versioni di PHP hanno migliorato le prestazioni e in genere utilizzano meno memoria.
Fortunatamente, è facile controllare e aggiornare la versione PHP del vostro sito. Per maggiori dettagli, consultate la nostra guida per principianti su come aggiornare la versione di PHP in WordPress.
Speriamo che questo articolo vi abbia aiutato a risolvere l’errore di caricamento delle immagini HTTP in WordPress. Potreste anche voler consultare il nostro elenco definitivo degli errori più comuni di WordPress e di come risolverli, insieme alle nostre scelte di esperti sui migliori servizi di email marketing per le piccole imprese.
Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Greg Zelt says
FANTASTIC!!! Every other search I did yielded nothing.
Godaddy hosting with wordpress installed. Killing imagick did the trick. My lightroom plugin is functioning like a trooper now.
Thank you so much, just had to share with you.
WPBeginner Support says
Glad our guide was able to help
Admin
Felix says
Solution #3 works for me like a charm!
WPBeginner Support says
Glad our recommendation worked for you
Admin
George says
Hi,
I started having this HTTP uploading error for images that are larger than 600x900px . The size in KB doesn’t matter – 100KB or 300KB – they are uploading just fine if they are less then 600×900.
I have tried all the methods you described without success.
Do you think that changing the theme can help?
WPBeginner Support says
You would first want to reach out to your hosting provider to ensure you are not running into a safety measure from their end that would cause the error.
Admin
George says
Thanks!
I called them before posting my question – they told me to contact WP support. To me, it also looks like they installed something on their server but are not willing to admit it.
I’ll call again.
fred david says
#3 worked for me too
WPBeginner Support says
Glad our recommendation worked for you
Admin
Baskar says
The Option No.3 is giving perfect result. Thanks Bro !
WPBeginner Support says
Glad our recommendation was helpful
Admin
Monique says
Instruction #3 worked for me. Thank you a bunch for this helpful documentation
WPBeginner Support says
You’re welcome, glad our guide could help
Admin
edsbali says
Solution number 3 worked for me
WPBeginner Support says
Glad our recommendation was able to help
Admin
DAMIAN says
The functions.php method worked for me. I’ve been trying to fix that for months! You saved me a lot of time. Thank you!!!
WPBeginner Support says
Glad our article could help
Admin
Almudena says
I have tried all the methods and none worked.
WPBeginner Support says
You would likely need to reach out to your hosting provider and they should be able to help solve the issue
Admin
Stu says
The functions.php method worked for me. Thank you for solving a months old problem!
WPBeginner Support says
Glad our recommendation could help you solve the issue
Admin
Ken Chan says
Thank you!! This was driving me crazy! #2 didn’t work but #4 did.
WPBeginner Support says
Glad our recommendation could help
Admin
Joe says
Solution #3 work like a charm! <3
WPBeginner Support says
Glad our guide could help
Admin
AG says
Tried all the above and no luck. My issue is only mp3 files, I get the http error. Contacted my hosting provider and they could find nothing wrong. Images upload fine. What am I missing?
WPBeginner Support says
For MP3 files you may need to increase the memory limit to 512 in case it is due to how large the files are
Admin
Stacey says
Number 3 worked for me! Thank-you so much, that was so frustrating before. You’re site is always so helpful
WPBeginner Support says
Glad our guide could be helpful
Admin
Mark R says
Thank you so much, I went through all four steps but nothing worked. I went back to step 1 and increased it from 256mb to 512mb which solved the problem.
WPBeginner Support says
Glad our guide could help be a part of the solution and you were able to get it resolved
Admin
KKervin says
Option #3 worked for me to resolve the HTTP error.
I installed the code snippets plugin and copied the code from here. It worked perfectly the first attempt.
Thank you!
WPBeginner Support says
Glad our guide could help you
Admin
yoeri says
Also just check the name of your image you want to upload.
Make it simple as this has done the trick for me on multiple occasions.
WPBeginner Support says
Thanks for sharing what worked for you
Admin
Lee says
@Yoeri – Thank you, for me it was just the image name as you suggested, I simplified the name, (it had spaces)
mohad ali says
can cloudflare cause this problem?????????????
WPBeginner Support says
While possible, it is not likely the root of the problem.
Admin
Apurba says
Thanks. No 3 works for me. great tutorial man
WPBeginner Support says
Glad our guide could be helpful
Admin
Honk the Honkler says
The .htaccess addition worked for me:
SetEnv MAGICK_THREAD_LIMIT 1
WPBeginner Support says
Thanks for sharing the solution that worked for you
Admin
Rory says
Another issue can be an apostrophe in the title i.e. dove’s it should be doves.
WPBeginner Support says
Thanks for sharing that recommendation to check
Admin
Yatu says
None of the methods is working. Please help!
WPBeginner Support says
Have you reached out to your hosting provider to see if there are any errors on their end?
Admin
Barri says
No 3 worked for me. thanks so much
WPBeginner Support says
Glad our guide could help
Admin
Jen Niles says
None worked above and then we realize our dev site needed to change the Home and Site URL in General Settings in WP Admin from http:// to https:// then it worked!
WPBeginner Support says
Glad you were able to find the cause of the problem for your site
Admin
Brian says
Thank you! #3 worked for me
WPBeginner Support says
Glad our recommendation could help
Admin
Lloyd says
great!!! it worked well. Thank you
WPBeginner Support says
Glad our guide could help
Admin
Marek says
None of these worked in my case. Mod security was the cause. I had to temporarily disable mod security on my web server.
WPBeginner Support says
Thanks for sharing what worked for you if other users run into this problem. For most users, they will need to reach our to their hosting provider for assistance in editing mod security
Admin
Stephen says
#3 WORKED!!!!! THank you so much for your help!! Stupid go daddy…
WPBeginner Support says
Glad our recommendations could help
Admin
JJ says
SOLVED: my pdf files that would not upload into the Word Press media library with HTTP Error had file names with a semi-colon in them. I deleted the semi-colon and it uploaded just fine. Semi-colons are legal characters in Word docs and pdf files, but apparently won’t upload to Word Press for reasons beyond my knowledge. ; ; ; ;
WPBeginner Support says
Thanks for sharing that solution for anyone else running into that problem
Admin
Kat C says
You’re a lifesaver! #3 worked on an old Godaddy Legacy server. Thanks so much.
WPBeginner Support says
Glad our recommendation was helpful
Admin
namagard says
the third one worked for me. thank you so much. ♥
WPBeginner Support says
Glad our recommendations could help
Admin
Mark says
Thank you!!! it worked!!!
WPBeginner Support says
Glad our tutorial could help
Admin
Westleboii says
None of these work for me. please help
WPBeginner Support says
If none of these methods worked, have you tried reaching out to your hosting provider to see if they can see an error on their end?
Admin
Renée says
A combined 2 and 3 worked for me, thank you!
WPBeginner Support says
Awesome! Glad our solutions could help fix the problem
Admin
PJ says
Setting GD as my preferred upload method worked for me.
WPBeginner Support says
Thanks for sharing which solution Worked for you
Admin
Erin says
Method #4 worked for me. It seems my host was limiting the plugins processing power. Thanks for sharing these solutions.
WPBeginner Support says
Glad our guide could help
Admin
Brad says
Another common problem for this is that you used an apostrophe in the file name. I just encountered this problem
WPBeginner Support says
Thanks for sharing what solved the problem for you
Admin
sarah says
Thank you! This was the simple fix I needed!
Ruth says
Thanks a lot, it worked!
WPBeginner Support says
Glad our tutorial worked for you
Admin
Shane says
Hi,
Thanks a million for this. Method 3 worked for me.
WPBeginner Support says
Glad our article could help
Admin
LEGEND says
#3 is super
WPBeginner Support says
Thank you
Admin
George R says
I have tried all the methods as mentioned above but none of these worked for me. So I contacted the service provider. They resolve the issue.
They have refreshed and whitelist another IP for me and it works.
Hope this may help for you too.
WPBeginner Support says
Thanks for sharing what worked for you
Admin
Stuart says
Go into Jetpack and disable the CDN option was how I fixed mine.
WPBeginner Support says
Thanks for sharing your solution to this problem
Admin
doun says
i have try all the methods above but still not working with me
WPBeginner Support says
Have you reached out to your hosting provider to ensure they don’t see any errors on their end?
Admin
Ashok says
Thanks guys, it worked. Fantastic solution.
WPBeginner Support says
You’re welcome, glad our guide could help
Admin
love says
don’t need to follow all step you just need to re-login your website and clear your temp files, that ok
WPBeginner Support says
For some people maybe, for others, they do require all of the steps in the article.
Admin
Harsha D says
#3 works perfectly. Thank you wpbeginner team.
WPBeginner Support says
Glad our article could help
Admin
Pawel Mansfeld says
OMG, I can’t believe! #3 works perfectly. Thank you for this tutorial!
WPBeginner Support says
Glad our article could help
Admin
John says
not worked with any method
WPBeginner Support says
If none of the methods in this article worked, you may want to reach out to your hosting provider to try the general troubleshooting steps in our article: https://www.wpbeginner.com/beginners-guide/beginners-guide-to-troubleshooting-wordpress-errors-step-by-step/
Admin
Sandy says
I tried Option 3. Now my entire home page is blank. Individual pages are still there. The Sidebar is still visible, but the rest of the home page is blank.
Please help if possible.
Thank you,
Sandy
WPBeginner Support says
You may want to ensure you didn’t change your homepage settings while troubleshooting and have you removed the code to see if that solved the missing content?
Admin
Sanju says
Worked like charm Option 3.
While My wordpress admin panel is slow.. Working on it. Any guide?
WPBeginner Support says
You may want to try disabling your plugins to see if one of your plugins could be slowing the admin area.
Admin