¿Necesitas corregir el error HTTP de subida de imágenes en WordPress?
Este error puede ser particularmente frustrante cuando se está creando contenido en WordPress. Suele producirse al subir una imagen u otros archivos al CMS utilizando la biblioteca de medios integrada de WordPress.
En este artículo, le mostraremos cómo corregir fácilmente el error HTTP de subida de imágenes en WordPress.
¿Qué causa el error HTTP durante la subida de medios en WordPress?
Hay muchas cosas que pueden provocar un error HTTP cuando intenta subir archivos a su sitio web de WordPress utilizando el cargador de medios de WordPress.
Básicamente, WordPress no se ha podido dar cuenta de la causa, y por eso muestra el mensaje genérico ‘Error HTTP’.
Lo frustrante de este error HTTP de WordPress es que no te da ninguna pista acerca de lo que puede haberlo causado. Esto significa que tendrás que probar diferentes soluciones para encontrar la causa y corregir el error.
Dicho esto, echemos un vistazo a cómo diagnosticar y corregir el error HTTP durante la subida de medios en WordPress. No dude en utilizar los enlaces de abajo para omitir a un método específico:
Método 1: Asegúrese de que el error HTTP no es temporal
En primer lugar, debe esperar unos minutos y, a continuación, intentar volver a subir el archivo de imagen a su sitio web de WordPress. Este error se produce a veces debido a un tráfico inusual y a la escasez de recursos del servidor, que se corrigen automáticamente en la mayoría de los servidores de alojamiento de WordPress.
Si esto no funciona, pruebe una o varias de las siguientes opciones:
- Actualice su navegador / explorador o vacíe la memoria caché del mismo.
- Cambia el tamaño y el nombre del archivo y vuelve a subirlo a la biblioteca de medios. Marca / comprueba nuestra lista de plugins de optimización de imágenes para reducir el tamaño de tus archivos.
- Guarda el archivo en otro formato. Por ejemplo, puede cambiar JPEG a PNG utilizando un software de edición de imágenes. Después, vuelva a intentar subir el archivo.
Si siguiendo todos estos pasos sigue apareciendo el error HTTP, entonces el error no es causado por un fallo temporal y definitivamente necesita su atención inmediata.
Método 2: Desactivar todos los plugins de WordPress
Si acabas de instalar un nuevo plugin de WordPress recientemente, puede que sea incompatible con tus otros plugins e interrumpa el proceso de subida de imágenes. Para ver si este es el caso, puedes desactivar todos tus plugins de WordPress.
Si el error HTTP desaparece después de desactivar un plugin de WordPress, entonces puede ser el culpable del error HTTP de subida de imágenes. Puede instalar un plugin alternativo o ponerse en contacto con el desarrollador para obtener soporte.
Para más información, marque / compruebe nuestra guía sobre cómo desactivar fácilmente todos los plugins de WordPress y cómo desactivar plugins cuando el escritorio de WordPress es inaccesible.
Método 3: Aumentar el límite de memoria de WordPress
WordPress está escrito en el idioma de programación PHP. Además, la cantidad de memoria asignada a los distintos procesos PHP viene determinada por el servidor de alojamiento web.
Si la subida de imágenes requiere más memoria PHP de la disponible, es posible que aparezca el error HTTP de subida de imágenes en WordPress.
Para corregir esto, necesita aumentar la memoria que PHP puede utilizar en su servidor.
En primer lugar, deberá acceder a los archivos de su sitio mediante un cliente FTP o la aplicación Administrador de archivos del panel de control de su alojamiento web. A continuación, vaya al directorio raíz y busque el archivo wp-config.php.
A continuación, deberá editar el archivo wp-config.php con un editor de texto y añadirle la siguiente línea de código:
define( 'WP_MEMORY_LIMIT', '256M' );
Este código aumenta el límite de memoria de WordPress a 256 MB, lo que sería suficiente para corregir cualquier problema de límite de memoria.
Por último, debe guardar o subir el archivo al servidor.
Para obtener más información, consulte nuestra guía paso a paso sobre cómo aumentar el límite de memoria PHP en WordPress.
Método 4: Cambiar la biblioteca del editor de imágenes utilizada por WordPress
WordPress funciona con PHP, que utiliza dos módulos para gestionar las imágenes. Estos módulos se llaman GD Library e Imagick. WordPress puede utilizar cualquiera de ellos, dependiendo de cuál esté disponible.
Sin embargo, Imagick a menudo tiene problemas de memoria, causando el error HTTP durante la subida de imágenes. Para corregirlo, puede hacer que GD Library sea su editor de imágenes por defecto.
Puede hacerlo simplemente añadiendo este código al archivo functions.php de su tema de WordPress o utilizando WPCode (recomendado):
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' );
Para más detalles, puede consultar nuestra guía sobre cómo añadir código personalizado en WordPress.
Después de añadir este código, puedes volver a intentar subir archivos utilizando el cargador de medios. Si esto no resuelve el problema, puede quitar / eliminar este código y probar otros métodos descritos en este artículo.
Método 5: Utilizar el método .htaccess
Este método le permite controlar cómo Imagick utiliza los recursos del servidor. Muchos proveedores de alojamiento compartido limitan la capacidad de Imagick de utilizar varios subprocesos para un procesamiento de imágenes más rápido. Sin embargo, esto hará que vea el error HTTP al subir imágenes.
Una corrección fácil es añadir el siguiente código en su archivo .htaccess:
SetEnv MAGICK_THREAD_LIMIT 1
Este código simplemente limita Imagick a utilizar un único hilo para procesar las imágenes.
Método 6: Actualice su versión de PHP
Si su sitio de WordPress está utilizando una versión obsoleta de PHP, entonces podría desencadenar el error HTTP de subida de imágenes. Esto se debe a que las nuevas versiones de PHP tienen mejoras de rendimiento y generalmente utilizan menos memoria.
Por suerte, es fácil marcar / actualizar la versión PHP de su sitio. Para más detalles, consulte nuestra guía para principiantes sobre cómo actualizar la versión de PHP en WordPress.
Esperamos que este artículo te haya ayudado a corregir el error HTTP de subida de imágenes en WordPress. Puede que también quieras ver nuestra lista definitiva de los errores más comunes de WordPress y cómo corregirlos, junto con nuestras selecciones de expertos sobre los mejores servicios de marketing por correo electrónico para pequeñas empresas.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and 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
Administrador
Felix says
Solution #3 works for me like a charm!
WPBeginner Support says
Glad our recommendation worked for you
Administrador
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.
Administrador
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
Administrador
Baskar says
The Option No.3 is giving perfect result. Thanks Bro !
WPBeginner Support says
Glad our recommendation was helpful
Administrador
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
Administrador
edsbali says
Solution number 3 worked for me
WPBeginner Support says
Glad our recommendation was able to help
Administrador
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
Administrador
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
Administrador
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
Administrador
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
Administrador
Joe says
Solution #3 work like a charm! <3
WPBeginner Support says
Glad our guide could help
Administrador
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
Administrador
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
Administrador
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
Administrador
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
Administrador
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
Administrador
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.
Administrador
Apurba says
Thanks. No 3 works for me. great tutorial man
WPBeginner Support says
Glad our guide could be helpful
Administrador
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
Administrador
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
Administrador
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?
Administrador
Barri says
No 3 worked for me. thanks so much
WPBeginner Support says
Glad our guide could help
Administrador
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
Administrador
Brian says
Thank you! #3 worked for me
WPBeginner Support says
Glad our recommendation could help
Administrador
Lloyd says
great!!! it worked well. Thank you
WPBeginner Support says
Glad our guide could help
Administrador
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
Administrador
Stephen says
#3 WORKED!!!!! THank you so much for your help!! Stupid go daddy…
WPBeginner Support says
Glad our recommendations could help
Administrador
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
Administrador
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
Administrador
namagard says
the third one worked for me. thank you so much. ♥
WPBeginner Support says
Glad our recommendations could help
Administrador
Mark says
Thank you!!! it worked!!!
WPBeginner Support says
Glad our tutorial could help
Administrador
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?
Administrador
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
Administrador
PJ says
Setting GD as my preferred upload method worked for me.
WPBeginner Support says
Thanks for sharing which solution Worked for you
Administrador
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
Administrador
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
Administrador
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
Administrador
Shane says
Hi,
Thanks a million for this. Method 3 worked for me.
WPBeginner Support says
Glad our article could help
Administrador
LEGEND says
#3 is super
WPBeginner Support says
Thank you
Administrador
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
Administrador
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
Administrador
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?
Administrador
Ashok says
Thanks guys, it worked. Fantastic solution.
WPBeginner Support says
You’re welcome, glad our guide could help
Administrador
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.
Administrador
Harsha D says
#3 works perfectly. Thank you wpbeginner team.
WPBeginner Support says
Glad our article could help
Administrador
Pawel Mansfeld says
OMG, I can’t believe! #3 works perfectly. Thank you for this tutorial!
WPBeginner Support says
Glad our article could help
Administrador
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/
Administrador
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?
Administrador
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.
Administrador