Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Cómo aumentar el tamaño máximo de subida de archivos en WordPress

Nota editorial: Ganamos una comisión de los enlaces de socios en WPBeginner. Las comisiones no afectan a las opiniones o evaluaciones de nuestros editores. Más información sobre Proceso editorial.

¿Quieres aumentar el tamaño máximo de subida de archivos en WordPress?

A veces, un límite bajo de tamaño de subida de archivos puede impedirle subir archivos con el cargador de medios o instalar plugins y temas de WordPress más grandes.

En este artículo, le mostraremos cómo aumentar fácilmente el tamaño máximo de subida de archivos en WordPress para corregir esos problemas.

How to increase the maximum file upload size in WordPress

¿Por qué aumentar el tamaño máximo de subida de archivos en WordPress?

Tu proveedor de alojamiento de WordPress establecerá por defecto un tamaño máximo de subida de archivos cuando accedas e instales WordPress. Tu proveedor de alojamiento define este límite, que suele oscilar entre 2 MB y 500 MB.

Para la mayoría de los propietarios de sitios web en WordPress, este límite será más que suficiente.

Sin embargo, hay ocasiones en las que necesitará aumentar este límite para no encontrarse con errores de subida.

Por ejemplo:

Dicho esto, vamos a mostrarle cómo puede aumentar el tamaño máximo de subida de archivos en su sitio WordPress.

Nota: Ten en cuenta que mostrar muchos archivos grandes en tu sitio web puede ralentizar seriamente su velocidad y rendimiento. Por eso, normalmente recomendamos no subir nunca vídeos a WordPress.

Dado que la mayoría de los usuarios tienen diferentes configuraciones de alojamiento de WordPress, cubriremos lo siguiente:

Tutorial en vídeo

Subscribe to WPBeginner

Si prefiere instrucciones escritas, siga leyendo.

Cómo comprobar el límite de tamaño máximo de subida de archivos en WordPress

WordPress mostrará automáticamente el límite de tamaño máximo de subida de archivos cuando esté subiendo imágenes u otros medios.

Para comprobarlo, simplemente vaya a Medios ” Añadir nuevo en su panel de administrador de WordPress, y verá el límite de tamaño máximo de subida de archivos para su sitio WordPress.

Check current file upload size limit

Ahora que ya sabe cómo encontrar el límite de tamaño, vamos a mostrarle cómo aumentar el tamaño máximo de subida en WordPress.

Método 1: Póngase en contacto con su proveedor de alojamiento de WordPress

Una de las formas más sencillas de aumentar el tamaño máximo de subida de archivos en WordPress es ponerse en contacto con su proveedor de alojamiento de WordPress.

Se trata de una tarea relativamente sencilla para su equipo de atención al cliente y puede realizarse en un par de minutos.

Para los principiantes, esto puede ser mucho más fácil que añadir código a WordPress y editar los archivos del servidor.

Sólo tienes que ir al sitio web de tu proveedor de alojamiento, como Bluehost, y acceder.

A continuación, haga clic en el icono “Chat” situado en la parte inferior de la pantalla. A continuación, puede solicitar al personal de soporte que aumente el tamaño de subida de archivos en su sitio de WordPress.

Clicking the Bluehost live chat support button in the dashboard

También puede contactar con el soporte desde el Escritorio de su cuenta de alojamiento.

Método 2: Crear o editar un archivo php.ini existente

Otra forma de aumentar el tamaño máximo de subida de archivos es creando o editando un archivo llamado php.ini. Este archivo controla una gran cantidad de ajustes para su entorno de alojamiento de WordPress.

La mayoría de los proveedores de alojamiento de WordPress, como Bluehost, disponen de un cPanel fácil de usar que te ayudará a gestionar tu sitio web.

Si tu alojamiento web tiene un Escritorio cPanel, entonces puedes aumentar el tamaño de subida de archivos a través de las herramientas integradas.

Nota: Lo siguiente es del cPanel de Bluehost. Sin embargo, la mayoría de los proveedores de alojamiento compartido tendrán pasos similares.

Encontrará un botón cPanel en la parte inferior de la pestaña Alojamiento en Bluehost.

Open cPanel in Bluehost

Al hacer clic en este botón se abrirá su Escritorio de cPanel.

Ahora tienes que desplazarte hasta la sección Software y hacer clic en ‘MultiPHP INI Editor’.

MuliPHP INI Editor in Bluehost's cPanel

A continuación, desplácese hasta la sección “upload_max_filesize” e introduzca un nuevo tamaño máximo de archivo en la casilla.

A continuación, haga clic en el botón “Aplicar”.

Upload Max Filesize Setting

También puede hacer clic en la pestaña del menú “Modo editor” y, a continuación, modificar el tamaño máximo de subida de archivos directamente en el editor.

Tienes que editar la sección ‘upload_max_filesize’ para aumentar el tamaño de subida de tus archivos.

Cuando hayas terminado, sólo tienes que hacer clic en el botón “Guardar”.

Change max upload filesize in code editor

Editar php.ini añadiendo código

Si su proveedor de alojamiento actual no ofrece la opción de cPanel, tendrá que editar este archivo manualmente.

Para ello, puede utilizar un cliente FTP o la opción de gestión de archivos de su panel de control de alojamiento de WordPress.

Si utiliza alojamiento compartido, es posible que no vea el archivo php.ini en el directorio de su alojamiento. Si no lo ves, simplemente crea un archivo llamado php.ini y súbelo a tu carpeta raíz.

A continuación, añada el siguiente fragmento de código al archivo:

upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300

Puedes modificar el límite de ‘256M’ al tamaño de archivo que necesites para tu blog de WordPress.

Método 3: Añadir código al archivo functions.php de su tema de WordPress

Este método consiste en añadir código al archivo functions. php de su tema de WordPress.

En lugar de editar el archivo directamente, le recomendamos que utilice WPCode. Es el mejor plugin de fragmentos de código que le permite añadir código a su sitio web sin romper su sitio web.

Si no lo ha hecho antes, consulte nuestra guía para principiantes sobre cómo añadir código personalizado en WordPress.

En primer lugar, debe instalar el plugin gratuito WPCode. Para más detalles, consulta nuestra guía paso a paso sobre cómo instalar un plugin de WordPress.

Una vez activado, deberá ir a Fragmentos de código ” + Añadir fragmento. Deberá pasar el cursor por encima de la opción “Añadir su código personalizado” y, a continuación, hacer clic en el botón “Usar fragmento”.

Add a Custom Snippet in WPCode

En la siguiente pantalla, debe dar un nombre a su nuevo fragmento de código y cambiar el tipo de código a “Fragmento PHP”.

A continuación, puede copiar y pegar el siguiente fragmento de código en ‘Vista previa del código’. Asegúrate de cambiar ‘256M’ por el tamaño máximo de archivo que necesites:

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );
Save Your Custom Snippet in WPCode

Por último, cambie el conmutador de la parte superior a “Activo” y, a continuación, haga clic en el botón “Guardar fragmento de código”. El código se ejecutará en su sitio web.

Método 4: Añadir código a su archivo .htaccess

Otra forma de aumentar el tamaño máximo de archivo es modificando el archivo .htaccess. Este archivo controla los ajustes de configuración de alto nivel de su sitio web.

Para ello, debe acceder al servidor de su sitio web a través de FTP. Si no ha hecho esto antes, consulte nuestra guía sobre cómo usar FTP para subir archivos a WordPress para principiantes.

A continuación, localice el archivo .htaccess en la carpeta raíz de su sitio web.

Open .htaccess file

Si no puedes encontrar tu archivo .htaccess, entonces podría estar oculto por tu gestor de archivos o cliente FTP. Para obtener más información, consulte nuestra guía sobre por qué no puede encontrar el archivo .htaccess en su sitio de WordPress.

A continuación, debe añadir el siguiente fragmento de código a su archivo .htaccess:

php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_time 300

Para aumentar aún más el tamaño máximo de subida de archivos, sólo tiene que cambiar ’64M’ por el tamaño que necesite.

Método 5: Utilizar un plugin de WordPress para aumentar el tamaño de la subida de archivos

Otra forma de aumentar el límite máximo de subida de archivos es usando el plugin WP Increase Upload Filesize. Si no te sientes cómodo añadiendo código a WordPress, entonces esta podría ser una buena opción para ti.

Lo primero que tienes que hacer es instalar y activar el plugin. Para más detalles, consulte nuestra guía sobre cómo instalar un plugin de WordPress.

Una vez activado, vaya a Medios ” Aumentar límite de subida en su panel de administrador de WordPress.

Esto le lleva a una pantalla en la que puede seleccionar un nuevo tamaño de archivo subido en el desplegable “Elegir tamaño máximo de archivo subido”.

A continuación, haz clic en el botón “Guardar cambios”.

Increase file upload size with plugin

Nota: El tamaño máximo de subida de archivos lo establece tu proveedor de alojamiento. Si necesita un límite de tamaño de archivo superior al que aparece en el desplegable, deberá ponerse en contacto con su proveedor de alojamiento y solicitar un aumento del límite.

Esperamos que este artículo te haya ayudado a aumentar el tamaño máximo de subida de archivos en WordPress. Puede que también quieras ver nuestra guía práctica sobre cómo elegir el mejor maquetador de sitios web y nuestra selección experta de las mejores aplicaciones de números de teléfono virtuales para empresas con opciones gratuitas.

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.

Descargo: Nuestro contenido está apoyado por los lectores. Esto significa que si hace clic en algunos de nuestros enlaces, podemos ganar una comisión. Vea cómo se financia WPBeginner , por qué es importante, y cómo puede apoyarnos. Aquí está nuestro proceso editorial .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

El último kit de herramientas de WordPress

Obtenga acceso GRATUITO a nuestro kit de herramientas - una colección de productos y recursos relacionados con WordPress que todo profesional debería tener!

Reader Interactions

406 comentariosDeja una respuesta

  1. 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!

  2. Alexander Gartley says

    Thanks, this helped me troubleshoot an upload limit. I’m on a WordPress multisite network install, so it ended up being a setting in the Network Admin Settings.

    I was confused at first, because my php settings were allowing larger uploads, but it was restricted in the Network Settings.

  3. Ernesto says

    Would have been great if you have included the .user.ini method.

    .user.ini uploaded in the root folder with the same value/text in your edited php.ini

    Most of the time, only this method works for shared hosting.

    ErnestPH

    • WPBeginner Support says

      The php.ini file should work the same as the user.ini file unless your specific host ignores the php.ini but thank you for sharing your recommendation :)

      Administrador

  4. Tamir Davidoff says

    Not working for me.
    I have followed this guide and double checked the php.ini file to make sure that the changed are in fact saved. changed htaccess file to increase limits. and also tried modifying the phpMyAdmin httpd-app.conf and php-settings.conf file. All of these files reflect max upload higher than 40m and my WP site does not reflect Any of these changes. Really frustrated here.

    Please help me, thanks !

    • WPBeginner Support says

      If you haven’t already, you would want to reach out to your hosting provider to ensure there is not a setting on their end that is overriding what you are setting :)

      Administrador

  5. rajesh says

    i have tried all 3 method none of them worked. i am trying to upload newspaper theme in my in my wordpress site. but every time it show that php.ini file upload max file size.
    plz help me

    • WPBeginner Support says

      You would want to reach out to your hosting provider to ensure they don’t have a setting that is overriding the changes you made.

      Administrador

  6. Adam Walsworth says

    Watchout for hidden php.ini files. In my setup I found 2 of them. The one which I found actually resolved the issue was found under

    ./etc/php/7.0/apache2/php.ini

    modifying this file fixed my issue.

    • WPBeginner Support says

      Thanks for sharing your solution, with where that file is located we would recommend most users reach out to their hosting provider before looking in locations like that.

      Administrador

  7. Rafiq khan says

    Thanks buddy i have solved my problem by adopting method 2 by editing my php.ini file
    Thanks alot you are working great

  8. Carla says

    None of the above worked for me. A matter of fact, editing the htaccess file broke my site even after deleting the above code. Overwriting with a new file fixed the problem though.

    I have a dedicated server on Bluehost. What worked for me was going in the WHM root, not cpanel nor FTP access. Search for MultiPHP INI Editor. Give it at least 5 minutes to load if you only see the title and icon. You can set you upload time, post size, etc. there. Works instantly, even if your site is using Cloudflare, without placing it in development mode or clearing the cache. I hope this helps someone.

    • WPBeginner Support says

      Thank you for sharing what worked for you, should other users be on a dedicated server, if they reach out and let BlueHost know the need to increase the upload size then BlueHost can normally edit that for them :)

      Administrador

  9. rahul says

    when i tried this
    Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.
    this happened to me
    whats the solution of this

  10. Ephraim says

    I had been trying php.ini method but it never works please how will I set it..
    Or you should please tell me the were to paste at function.php

    • WPBeginner Support says

      You would normally use a text editor to set the content in the php.ini file. For your functions.php it should go at the end normally so it can be removed later as needed. You may also want to check with your hosting provider if you are having trouble with these methods for if they can assist in increasing the file size for you.

      Administrador

  11. Achilleas says

    I am using Nginx and i had already setup properly the values for php in the php.ini but what fixed it was puting the same value in the server block with the variable client_max_body_size xxxM;

    I am writing this hoping it will help someone.

  12. Adriana Sabo says

    None of the options worked for me. Nothing happened when I tried the first two, and the last one prompted an error 500. Any way you can help?

  13. Tom Allen says

    The above explanation is fine for hosted sites, bit what about us guys that locahost? I still can figure out the “upload_max_filesize” error when downloading Updfaftplus from WP Plugins or from a download zip file. I am a beginner and need hand-holding through this process. Help is appreciated.

  14. crystal says

    hta access worked.
    you guys must put the code before #END WordPress
    if you put after #end wordpress then site goes to 500 internal server error in my experience with godaddy hosting

  15. Jaime Lopes says

    On most of the shared cPanel sites I’ve setup:

    -changing .htaccess brings the whole site down (500 internal error)
    -adding php.ini or php5.ini files does nothing
    -there is no option to choose ‘Site Software’ in cPanel…

  16. Megan says

    Thank you! This was a huge help! I couldn’t even upload plugins because my limit was pre-set at 2MB…Now I’ve got it to 64MB and am able to work.
    Thanks!

  17. Martin Croker says

    On vidahost (now TSOhost).

    Adding the following php.ini worked for me… however (and I’m still a bit confused why), just putting it at http root didn’t work – I had to duplicate the php.ini file inside wp-admin and wp-include directories within wordpress.

  18. Dwayne S says

    I’m on HostGator and currently having issue with max execution time. It occurred a few weeks ago and HostGator support fixed the issue. It now reappeared and support is telling me that they can’t fix it because I’m on shared server. The agent even crashed my site by manually editing the htaccess file and didn’t verify if it was working or not. He did however recommend a plugin that would edit the htaccess file with code to increase the limit but it doesn’t work. I guess HostGator blocks it

  19. Caleb says

    I have GoDaddy hosting and contacted them to help me increase my file upload size. It was a piece of cake — I didn’t have to create any files, add code to my theme, or anything like that. So for those of you who have GoDaddy or cPanel type controls, forget hacks and just use your admin settings.

    Here’s what support had me do:
    1. Go to your cPanel Admin (a similar hosting panel ‘might’ work somewhat the same)
    2. Scroll down to the ‘Software’ and click on ‘Select PHP Version’
    3. Click on ‘Switch to PHP Options’ in the top right And TADA! There’s all your PHP Options!
    4. Just go down and change the ‘post_max_filesize’ and ‘upload_max_filesize’ to whatever you want, apply and save your changes, and you’re now a safe and happy non-coding website owner.

    Good luck!

    • Rich Perozich says

      This worked for me but in order to even find these files, I had to call godaddy where I was walked through these steps or I never would have been able to navigate to the cpanel Admin without their help.
      1. Sign on to godaddy
      2. Click on my products upper left
      3. Under web hosting click manage all
      4. Click web hosting with C panel
      5. Click C panel Admin icon
      6. Scroll down to Software and click Select php version
      7. Click on switch to php options
      8. At bottom of page click on the number upload_max_filesize and select # you wish as the max filesize
      9. Click apply. It works. Now file sizes can be uploaded to the selected max.

  20. Chris Sandford says

    Multisite Users:
    If your a dumb dumb like me, you may have tried everything to no avail.
    Don’t forget if you’re using WordPress Multi-site, to change the upload settings for individual sites.
    Network Admin > Settings > Max upload file size

    You may still need to use the tips in this article, but without changing the upload settings for multi-site, you won’t know if it’s working.

  21. mara says

    Anyone on here get this to work with Godaddy? There are very unhelpful. I know I need to create the php.ini file, (and I did), but none of the solutions you posted worked. Any help is appreciated.

  22. Lynn says

    Wish you wouldn’t assume everyone looking for this solution knows what you mean by our “Theme Functions File” – do you mean functions.php? I’m not an expert, and I’m really good at following precise directions, and don’t want to even put a toe in the water of editing files if I don’t know EXACTLY what file you’re talking about! No clues were provided, like what other code I might look for in the file to know I’m in the right place, etc. So…this didn’t help me at all :-(

  23. Alex says

    Thank you, method 3 really worked for me
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300

  24. Mituka says

    This worked for me.

    Open your .htacess file with notepad.

    Skip everything you see and at the bottom.

    Paste the following and save.

    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300

    • Thomas says

      Where exactly did you paste it?

      # BEGIN WordPress

      RewriteEngine On
      RewriteBase /
      RewriteRule ^index\.php$ – [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /index.php [L]

      # END WordPress

      php_value upload_max_filesize 64M
      php_value post_max_size 64M
      php_value max_execution_time 300
      php_value max_input_time 300

      Is it before the #END WordPress statement? ( I get error when I do that)

      Or should it be after the #END WordPress statement?

Deja tu comentario

Gracias por elegir dejar un comentario. Tenga en cuenta que todos los comentarios son moderados de acuerdo con nuestros política de comentarios, y su dirección de correo electrónico NO será publicada. Por favor, NO utilice palabras clave en el campo de nombre. Tengamos una conversación personal y significativa.