Tutorials/Tips

Editing php.ini file in VestaCP for upload_max_filesize exceeded error

VestaCP is an open core Web hosting control panel similar to cPanel. It’s a popular replacement for cPanel when you don’t want to pay cPanel’s monthly fee. I actually use it to host several websites on Vultr but perform most of the system management from the command line.

This short article shows how to edit the php.ini file to fix the upload_max_filesize exceeded error that’s usually encountered when one attempts to upload a file whose size exceeds that allowed by PHP. That error should be very familiar to users of WordPress, because that was what I was using when I encountered the error shown in the image below.

Error uploading huge file in WordPress

Though the error message tells you what directive to modify and the file to find it in, it doesn’t tell you what directory the file is in. I can tell you that if you’re using CentOS 7, the same Linux distribution that powers my server, you’ll find the file under the /etc directory.

Related Post:  Dual-boot Fedora 25, Windows 10 on a computer with UEFI firmware

By default, the value of that directive is 2M, that is, 2 MB. Since the file I was trying to upload was 3.3 MB, I only needed to give the directive a higher value and restart Apache. How I went about it is shown in the following code block. By this time you know that I first had to log into the server by SSH. I manage the server from the command line using the root account and not sudo, so sudo is not used in the following commands:

After Apache has been restarted, you may try uploading the file again. That fixed it for me. Did not need to modify any other directive.

Related Post:  Understanding the Technology Behind Most Online Casinos and Slot Games

Subscribe to LinuxBSDos.com

Subscribe to receive the latest articles in your Inbox

Trust me, you'll not be spammed...

Please share:

We Recommend These Vendors and Free Offers

Register now for Blockchain & Cryptocurrency Con 2018, international conference on blockchain technnology in Dallas, TX (USA), Feb. 23-24, 2018. A 50% discount for students.

Best WhatsApp Plus features in Gbwhatsapp latest APK download

Best binary auto trading software reviews by 7binaryoptions.com

Google has got competition, because Presearch is building a blockchain-based search engine controlled by the community. At $0.15 a token, you can participation in Lot 3 of the token sale by clicking here

Open Money is building a solution that will run mainstream software on blockchain tech. Click here to get free tokens that will be the digital currency of the platform

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).


Leave a Comment

Your email address will not be published. Required fields are marked *

*