La mayoría de los proveedores de hosting establecen límites a la memoria PHP para ejecutar aplicaciones. El archivo cargado excede la directiva upload_max_filesize en php.ini es un error que se produce en su sitio web WordPress cuando carga un archivo que excede las limitaciones establecidas por su servidor web.
Cómo solucionar el error upload_max_filesize
As you might have guessed, the solution involves increasing the default limit of upload_max_filesize. Let’s look closely at it and see what steps we can take to fix this error.
Método 1. Editar el archivo .htaccess
- Inicie sesión en CPanel y vaya al Administrador de archivos en la sección Archivos.
- Localice el .htaccess y haga clic con el botón derecho para Editar.
- Añada la siguiente línea al final del archivo y guarde los cambios.
php_value upload_max_filesize 256M
Método 2. Editar el archivo wp-config.php
Otra forma de solucionar el error upload_max_filesize en php.ini es modificando el archivo wp-config.php en el directorio raíz.
For that, log in to the CPanel and access public_html to edit the wp_config. php file. Add the following line before the “That’s all, stop editing! Happy publishing” line:
@ini_set('upload_max_size' , '256M' );
Una vez que haya añadido el código, guarde el archivo, actualice su navegador e intente cargarlo de nuevo.
Método 3. Actualizar php.ini para corregir el error upload_max_filesize
Si lo desea, siempre puede modificar su configuración PHP a través de la herramienta de Configuración PHP en CPanel.
If you’re using VPS or a different platform, you can try updating php.ini to fix the error. Here’s what you need to do:
- Navigate to your php.ini file and edit it. If you can’t find it, ask for assistance from your hosting providers.
- Localiza el upload_max_filesize y auméntalo cambiando su número. También puede aumentar algunas otras limitaciones, como se muestra a continuación:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 180
Save the file, and that’s it. The error should no longer occur.