How to Increase Upload Size in Bluehost
Struggling with how to increase the maximum file upload size in WordPress?
The default max upload size value depends on your host, but it can be quite low in some cases. This tin result in you seeing errors such as "The uploaded file exceeds the upload_max_filesize directive in php.ini" when you try to upload files to your WordPress site'due south Media Library or via other upload interfaces.
Thankfully, there are some fixes that you can employ to solve the problem.
In this post, we'll show you several dissimilar methods that you can utilize to increase the maximum file upload size on your WordPress site.
Many of these methods volition crave calculation some code snippets to your site. However, we will get-go with a uncomplicated plugin method that might work depending on how your server is configured.
Here are the v methods that we'll encompass:
- Complimentary plugin (code-gratuitous)
- functions.php (lawmaking snippet)
- php.ini file (hosting dashboard or lawmaking snippet)
- .htaccess file (code snippet)
- Bonus workaround – upload files via FTP
Let's become started!
How to Cheque WordPress Max File Upload Size
Earlier getting started, here's a quick way to cheque your WordPress site's existing max file upload size.
In your WordPress dashboard, go to Media → Add New and look for the Maximum upload file size value:
If this value is smaller than the file y'all're trying to upload, y'all now know why you're having bug.
How to Increase the Maximum File Upload Size in WordPress
Earlier we go started, I want to note that whether or not some of these methods work depends on your host's configuration. We cannot guarantee that all of the methods will work for your specific situation. But we can say that they work for many WordPress users and hosting configurations.
And then, if you try these methods and notice that they don't work for you, your next step should be to reach out to your host's back up. They might be able to override whatever is causing the trouble.
With that caveat out of the fashion, let's get into the tutorials…
1. Use the Complimentary Increment Maximum Upload File Size Plugin
The accented simplest choice to increase your max upload size is to use the free Increase Maximum Upload File Size plugin because it doesn't crave editing any code.
Withal, the plugin will only piece of work upwards to the maximum upload limit set by your server. For that reason, it will simply fix the problem if the issue is that your WordPress site'south upload limit is set lower than the server upload limit for some reason.
To check if it will work for you lot, install and actuate the gratis plugin from WordPress.org. Then, get to Settings → Increase Maximum Upload File Size.
Y'all'll see the max upload size from your server too equally your WordPress site'south current site limit. Yous can and then use the drop-down to set your site's max anywhere upwards to the server max:
If your server's max upload size is still besides low, keep reading for some code-based fixes for that.
2. Use Child Theme's Functions.php or Code Snippets Plugin
In some situations, you can increase your max upload size past adding the following code snippets to either your child theme'southward functions.php file or via the Code Snippets plugin (or another similar plugin).
If you lot're adding it to functions.php, make certain to use a kid theme. Otherwise, your changes will exist overwritten when y'all update your theme.
@ini_set( 'upload_max_size' , '32M' ); @ini_set( 'post_max_size', '32M'); @ini_set( 'max_execution_time', '300' ); You tin can modify the numbers – '32M' – according to your needs. For example, to brand the max upload 64 MB, you could alter it to '64M'.
3. Create or Edit php.ini File
The php.ini file controls basic PHP configuration variables, including the max upload size.
At some hosts, y'all might be able to edit the php.ini file via cPanel, which is simpler than editing the file straight. For instance, with Bluehost, you can open cPanel by clicking the Advanced tab in your Bluehost dashboard. And so, you can select the MultiPHP INI Editor tool:
Then, yous can select the site that y'all want to edit and adjust the upload_max_filesize directive:
If your host doesn't offer such a tool, you tin effort accessing the file directly.
Connect to your server's root binder using FTP or cPanel File Manager (the root folder is the aforementioned folder that contains the wp-config.php file):
- If you run across an existing file called php.ini, edit that file. You might need to tell your FTP client to show hidden files.
- If you don't see an existing file, create a new file called php.ini.
Then, add the post-obit lines of code:
upload_max_filesize = 32M post_max_size = 32M max_execution_time = 300 Or, if you already meet those lines of code, edit the numbers according to your needs.
4. Add Lawmaking to .htaccess File
If your host uses the Apache web server (which most WordPress hosts do), you tin try to increase your max upload size past editing your site's .htaccess file.
To edit the .htaccess file, you'll need to connect to your server using FTP or cPanel File Manager. So, notice the .htaccess file in the root folder (the same binder that contains wp-config.php).
Before making whatever edits, you should download a copy of the file to your local estimator so that you lot have a safety backup in example something goes wrong (information technology's unlikely – but the .htaccess file is sensitive and then you e'er want to take a backup).
Once y'all accept a backup, edit the file and add together the following code:
php_value upload_max_filesize 32M php_value post_max_size 32M php_value max_execution_time 300 php_value max_input_time 300 Again, you lot can modify the numbers co-ordinate to your needs.
v. Talk to Your Host'south Support
Once more, we tin can't guarantee that these methods will work for all sites because sometimes your host's configuration simply won't permit these tactics to work.
And then – if nothing has worked and then far, we recommend that you attain out to your host's support to see if they will increase your server'due south upload limit for you.
Workaround: Upload Via FTP and Import to WordPress
If zippo has worked then far and your host won't increase the max upload file size for you, I'll finish by sharing a workaround that you can use to upload huge files to your WordPress Media Library.
This won't permanently fix the problem, but it will give you a way to become the file uploaded right abroad, which might exist exactly what you need right now.
Instead of trying to upload files via the WordPress dashboard, you tin upload the file using FTP, which will completely bypass whatever file size limits.
To go started, use FTP to upload the file to the wp-content/uploads/… folder, making sure to select the correct yr/calendar month.
For case:
/wp-content/uploads/2021/01/
Now, the file is on your server. However, WordPress won't recognize it inside your Media Library yet. To fix that, you tin utilize the free Add together From Server plugin to register the file that you uploaded to your Media Library.
Later activating the plugin, go to Media → Add From Server:
Then, open the folder where you uploaded the file via FTP and import the files that y'all uploaded:
Once you lot import the file using the plugin, yous'll see the file in your Media Library just as if yous'd uploaded it direct via your WordPress dashboard.
For a deeper look at this method, check out our tutorial on how to bulk upload files to WordPress.
Increase WordPress Maximum File Upload Size Today
In this mail, we've shared a number of dissimilar methods that you tin can apply to increase your WordPress site'south max file upload size.
For the simplest pick, you should get-go with the free Increment Maximum Upload File Size plugin. Even so, remember that this plugin will merely piece of work if your WordPress site'south max upload is set below your server'southward limit – it can't increase the server limit by itself.
If the server limit is the problem, you lot'll demand to try one of the code snippets that we shared. And if none of those piece of work, you tin can reach out to your host's back up to encounter if they tin can help you out.
Or, you tin can also become effectually this effect entirely past uploading a file via FTP then using the Add together From Server plugin to import it to your Media Library.
For more than tips on how to fix these types of WordPress issues, cheque out our guide on how to troubleshoot WordPress errors.
Still have any questions about how to increase the maximum file upload size in WordPress? Ask us in the comments!
Source: https://www.wpkube.com/how-to-increase-the-maximum-file-upload-size-in-wordpress-5-methods/
0 Response to "How to Increase Upload Size in Bluehost"
Post a Comment