You can resolve a WordPress file upload size error by increasing the maximum upload limit in your server configuration. This allows you to upload larger files, such as themes, plugins, or media, that are currently being blocked by your server's limits.
Before you begin
You will need:
Site Administrator access to your WordPress dashboard.
Access to your hosting control panel (such as cPanel or Windows Control Panel) or your site's configuration files.
Increase the upload limit via .htaccess
The .htaccess file is used by many servers to define configuration rules. Adding a specific line can override the default upload limit.
Log in to your hosting control panel.
Open the File Manager for your WordPress installation.
Navigate to the root directory of your WordPress site (usually
public_htmlorwww).Locate the
.htaccessfile.Edit the file and add the following code at the bottom:
php_value upload_max_filesize 64M php_value post_max_size 64M
Save the changes.
Increase the upload limit via php.ini or .user.ini
If your server uses a dedicated PHP configuration file, you can update the limits there.
Log in to your hosting control panel.
Open the File Manager for your WordPress site.
Locate the
php.inior.user.inifile in your root directory.Edit the file and locate the following lines:
upload_max_filesizepost_max_size
Change the values to your desired limit (e.g.,
64Mor128M).Save the changes.
Increase the upload limit via WordPress configuration
Some hosting environments allow you to set these values directly within the WordPress configuration file.
Log in to your hosting control panel.
Open the File Manager for your WordPress site.
Locate the
wp-config.phpfile in the root directory.Edit the file and add the following code before the line that says
/* That's all, stop editing! Happy publishing. */:
@ini_set( 'upload_max_filesize' , '64M' ); @ini_set( 'post_max_size' , '64M' );
Save the changes.
Confirm the result
Log in to your WordPress dashboard.
Navigate to Media > Add New.
Look for the "Maximum upload size" notice. It should now reflect the value you entered (e.g., 64 MB).
Attempt to upload a file that was previously too large to confirm the process is successful.
If the limit does not change
If the upload limit remains the same after editing your files, your hosting provider may have a hard limit set at the server level.
Contact Hostek Support to confirm if your specific hosting plan allows for a higher upload limit and to request a manual increase if necessary.
