Have you ever tried to upload some large file on WordPress only to be stopped from doing so because of its size? Did you know there’s a default limit for the maximum file upload size in WordPress? To make sure that users don’t overload their server space, WordPress has a default upload size for media files as well as post size.
You can check out your WordPress website’s default maximum upload size by simply clicking on Media on the WordPress dashboard side and then clicking on Add New.
This limits the size of the content you can enable on your website and can be annoying if you intend to upload large files on your website. Additionally, this can be an issue if you were importing large sized Demos from various One click demo importers such as our very own ThemeGrill demo importer. Many demo importers including our own recommend changing this upload size limit before using them.
While it may require messing with your website’s files, there is a simple fix to this issue as well. You can simply uplift this limit by adding a few codes to your WordPress files. Specifically speaking, your .htaccess file.
Thus, BeautifulTheme brings you this guide today on how to change maximum upload file size in WordPress to enable larger uploads and demo importers on your website. Feel free to comment if you have any confusion regarding any of these steps and we will help you to the best of our capabilities.
Change maximum upload file size in WordPress by editing the .htaccess file
For increasing your maximum upload size on WordPress, you need to have FTP access to your WordPress’ installation. This can be done by using cPanel and its File manager or directly using Filezilla or any other FTP client. As cPanel is the more popular form of website management, we’ll be showing you how to do so using CPanel.
First, you need to gain access to your WordPress’s root folder by opening your FTP/cPanel. Then you need to edit your .htaccess file and add a few codes to change the maximum upload file size WordPress settings.
Opening and editing .htaccess file on cPanel
By default, the .htaccess is kept hidden and you need to change your cPanel’s settings to view your hidden files. To do so, simply click on the Settings button on the top right in cPanel. Then in the settings panel, click on the Checkbox option that reads “Show hidden files”. Now, your screen will refresh and you will be able to see all the hidden files in your server folder.
Next, open your WordPress installation’s root folder and find the .htaccess file. Click on it and then click on the Edit button on the toolbar to open its editor screen.
After you do so, you might be asked for confirmation regarding your Unicode settings. Click on Edit again on the pop-up window to move on to your editor screen.
On your new editor screen, you can simply paste the following line of code:
[php]php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
[/php]If your .htaccess has pre-existing text written on it, we highly recommend you paste these lines of text right above it.
Once you’re done, click on Save changes button on the Top right and your .htaccess file will be edited and saved.
Now, if you open your Add new media page again, you will be given a different upload limit size. Thus, using these steps you should able to change maximum upload file size in WordPress websites.
However, it is important to note that this solution will not work if you are on shared hosting. In order to change the maximum upload size in websites on shared hosting, you will have to contact your web hosting provider about it. Once you request them to do so, you should be able to change the maximum upload size on your website.
Concluding:
Thus this process should help you fix any issue regarding maximum upload size on WordPress. Similarly, there are also more tweaks for your WordPress installation that should help you customize your website better.
Therefore, you should consider checking out some of our other articles that tackle similar issues: