Changing PHP Setting Parameters via SSH
Secure Shell, sometimes referred to as Secure Socket Shell, is a protocol which allows you to connect securely to a remote computer or a server by using a text-based interface.
When a secure SSH connection is established, a shell session will be started, and you will be able to make application-related changes in a container by issuing commands. This article wills show how you can do it.
Note: For security reasons, only the accounts have passed our verification will be granted permission to the Shell / SSH service. If you would like to enable it, please update your billing information. Our staff will finish verifying your information within 2 hours.
1. Locate your target deployment
Log in to the Control Panel and locate your target deployment on the Home page or the My Applications page.
2.Go to the Shell / SSH page
Go to the Shell / SSH page by clicking the "Manage" button on the Home page or the My Applications page.
3. Change the setting parameters
locate the PHP setting parameters file - the php.ini file
Click the “Connect” icon on the Shell / SSH page to launch the command-line interface.
For security reasons, only the accounts have passed our verification will be granted permission to the Shell / SSH service. If you would like to enable it, please update your billing information. Our staff will finish verifying your information within 2 hours.
There are several SSH commands that you can use to work with or manipulate the directories (or folders) in your WordPress site.
ls
– Show Directory Contents (List the Names of Files)
cd
– Change Directory
Input the command “
ls
”, followed by pressing the “Enter” key to check the file under the /cloudclusters directory.Enter the command “cd config/” to change to the “/cloudclusters/config” directory, followed by the command “ls” to check the files under the directory.
Type in the command "cd php", you can see the configuration file for PHP: php.ini
Change the setting parameters
Input the command “vim php.ini” to go to the editing interface.
Now press the “a” key on your keyboard so you can start changing configurations.
Scroll down the page and search for the parameters you would like to make changes to.
After the editing, hit the “Esc” key, followed by entering the “:wq” to save the changes.
Make the changes effective
Click “Reboot” on the Shell / SSH page to make the changes effective. Once you start the reboot process, the status will be changed to “Startup”. It may take 1-2 minutes to complete the reboot process. When it’s finished, the status will be changed back to “Running”, and you can repeat the steps as said above to check the configuration file.