fbpx
How to increase PHP Upload limits on CloudPages?
August 6, 2021

When you set up a new server with CloudPages your default PHP upload limits are low. Users need to increase those limits so that they can import large databases or upload large themes/plugins inside WordPress. In this article, I will show you how to increase PHP upload limits on CloudPages.

To change or increase upload limits you need to access your server’s SSH through Putty or Bitvise.

For this article, we choose Bitvise, open Betvise SSH client, provide the User Name, IP, and port of your server.

You can also add the public key to your server for passwordless authentication, however, in this article, we use password authentication but in the production environment, I recommend using key-based authentication for security reasons.

Once you have added the required data click on the Login button.

After some time you will successfully be logged in, you can see the terminal and SFTP window on the sidebar click on the New SFTP window.

Goto to Remote file section, and go to /home/yourwebsitediectory/public_html, here create a new file info.php.

Now you can paste the following code into the info.php file and save it.

<?php


phpinfo();


?>

Once you have saved the file, open the https://websiteurl.com/info.php into your browser, you can see the following page. On this page check the location of Loaded Configuration File, here the php.ini file path is given, now you can open /usr/local/lsws/lsphp73/etc/php/7.X/litespeed/php.ini (path in your case can be different depending upon PHP version) via Bitvise and change your memory limits.

Now move to /usr/local/lsws/lsphp73/etc/php/7.x/litespeed/ location on SFTP. you can see the php.ini file is shown, right-click on it and then click on edit.

The file is opened in a default text editor, you can search the following parameters and update the value according to your choice and save it.

post_max_size: (this must be usually higher than upload_max_filesize)

upload_max_filesize: to increase the upload limit.

Once you update these configurations you need to kill all PHP processes.

Access your server terminal and run this command:

killall lsphp

Once you did the whole procedure, your upload limits are successfully updated.

Go to the info.php page and check the changed limits.

Habbi is support lead at CloudPages. He also loves to write about WordPress, SEO and Digital Marketing.

Recent Posts

Get Newsletter Updates

How To Create Business Email Address Using Zoho Mail?

How To Create Business Email Address Using Zoho Mail?

https://youtu.be/GGEWKol-0PQ Many people need to manage their emails as well as their sites. Like big agencies, small agencies, freelancers, and service providers, they all manage their email along with their websites. This article will show you how you can manage...

read more
How to use Amazon SES to send Emails

How to use Amazon SES to send Emails

https://www.youtube.com/watch?v=ntFhQJ-NrEQ In this tutorial, you will learn how to use Amazon SES (Simple Email Service) to send emails. Email service is required for all sorts of sites to send transactional and marketing emails. So if you are sending transactional...

read more
How to reset OpenLiteSpeed/LiteSpeed WebAdmin Password?

How to reset OpenLiteSpeed/LiteSpeed WebAdmin Password?

Recently I published an article How to Enable Advanced WordFence Protection on OpenLiteSpeed? Eventually, I realized that some users were trying to access the OpenLiteSpeed/LiteSpeed WebAdmin, but they lacked a password, and I completely missed the instructions for...

read more
How to Enable Advanced WordFence Protection on OpenLiteSpeed?

How to Enable Advanced WordFence Protection on OpenLiteSpeed?

https://youtu.be/mXMncsLhiuU First and foremost, website security should always be a priority. If you have a custom website, you must deal with all the security hacks during the development phase of your website. You have to block all external access and keep all...

read more

Comments

0 Comments

Submit a Comment

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

Subscribe

Join Our Newsletter

Pin It on Pinterest

Share This