.user.ini/Increase PHP limits

.user.ini

A .user.ini file will help us increase the PHP limits on your hosting account. There are many reasons to increase PHP limits and one of those is to allow you to upload large files in WordPress. I had to learn this trick years ago when uploading a large theme and got an error that the file was too large. Now you can always manually upload your plugin or theme, however there are ways to adjust these settings in your control panel or by creating a .user.ini file on the server. This will allow you to upload large files in WordPress as well as increase other limitations on your server.


The limits of the possible can only be defined by going beyond them into the impossible.

Arthur C. Clarke

CPanel/Control Panel

When your website is hosted on a CPanel hosting platform you should be able to increase your PHP limits without creating a .user.ini file. Once in your CPanel you will want to click on the icon that says Select PHP Version under the heading Software. Now select Switch to PHP Options in the upper right hand corner. You should now be able to select 512M for your memory_limit and 1G for your upload_max_filesize. This will now allow you to upload larger files in your WordPress dashboard or any CMS.

File Manager

If you have access to your hosting account, locate your file manager. With access to your website files this should be a pretty straight forward process. First, you will want to locate your root directory and create a new file named .user.ini then open it and paste in the values below:

upload_max_filesize = 1000M
post_max_size=1005M
max_execution_time=120

FTP Upload

If you are running on Managed WordPress or don’t have access to your hosting control panel or file manager, we will need to upload the .user.ini file from your computer. First, we need to create the file and store it on your desktop. Then, we can upload it directly to the hosting server. To begin, open up a text editor like Notepad and paste in the following values:

upload_max_filesize = 1000M
post_max_size=1005M
max_execution_time=120

Now you will want to save the file somewhere you can find easily. Name the new file .user.ini making sure the file type is a .txt file. Once you have the .user.ini file stored locally, you will want to upload the file to your root directory using an ftp client like Filezilla. Finally, if you not sure how to upload files review my instructions on how to manually install a WordPress plugin or theme.

Wrap Up

Pat yourself on the back superstar. You have now successfully increased your PHP limits and can no upload large files in WordPress and other CMS platforms. Now that you have given your server a little more breathing room you should consider these 6 Steps to Speed Up WordPress.