Knowledge Base
MilesWeb / Web Hosting FAQ

Steps to Create a phprc file via SSH

Approx. read time : 2 min

Each of the PHP installation comes with default settings that are generally fine for most websites. It’s very rare when the requirements of a website, make it essential for adjusting the PHP settings. In this case creating a php.ini (phprc) file is the solution for adjusting the PHP settings for your website.

In standard term, php.ini is used for a PHP configuration file.

A phprc file can be created using an FTP client, or by logging into the server via SSH, but it would be easy to create a phprc file using an FTP client. This article explains the steps to create this phprc file via SSH.

Steps to Add a phprc file using SSH

1. Using SSH, log into your server.

2. Type ‘pwd’ to confirm that you are in your users directory:

In this directory, a single command can be run to create the /.php folder as well as the /7.2 folder that is present inside of it. Remember to first check the version of PHP your site is using. In the below example, we have assumed that the site is using PHP 7.2. If your site is running PHP 7.1, name the directory as 7.1 instead.

3. Execute the below command:

4. Run the below code to change your directory into these two new folders you just created:

  • After running pwd, you will see the entire filepath you just created:

5. Create the phprc file without an extension, in this folder.

You can run a few programs for creating this file. In this example, a program called nano is used.

6. Execute the below code to create the phprc file:

A text editor will pop up.

7. Next, edit the file with the help of your PHP customizations.

8. Close the file and go back to your shell.

How to Kill off running PHP processes?

After saving your changes, it is essential to kill off all running PHP processes. This helps your new settings to get updated.

How to Confirm Your Changes?

After editing the file and killing off all PHP processes, it is important to confirm if the values have updated. This can be done by creating a phpinfo.php file.

If your changes aren’t updated, try killing off your PHP processes again.

Conclusion

The phprc file is used for any domains under this specific username which also run the specific version of PHP you selected in step#3 while creating the directory.

For example, if the user has three domains from which two are running PHP 7.2 and the third is running PHP 7.1, only the first two domains that run 7.2 would be affected by the phprc file. You will need to create a separate phprc file for the PHP 7.1 site.

Also Read:

How To Login to Your Server By SSH?

How to Create and Edit a File via SSH?

Steps to Perform When the phprc file isn’t Updating

Avatar
Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.

Trusted By Thousands of Clients & Big Businesses

We highly appreciate the kind and stellar feedback we receive from our customers. Delivering the best is our goal! MilesWeb is rated Excellent 4.8 out of 5 based on reviews. Read more reviews.

Excellent
Based on reviews
2 hours ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
4 hours ago
Milesweb is superb Hosting pro...
Milesweb is superb Hosting provider ever, their Support team is amazing!!!...
Abhishek Singh
15 hours ago
Great support in great timing...
We need urgent assistance on changes in a primary domain on our client's Cpanel accounts and reached...
Riyaju Deen
21 hours ago
Best Website Hosting platform ...
I was new on MilesWeb. And needed help on multiple areas from setting up to getting started with cre...
Harshada
1 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
1 days ago
the team is very supportive th...
the team is very supportive though at times effort needs to be made to make understand the problem s...
Suree Sharma
1 days ago
I am using miles web for 3plus...
I am using miles web for 3plus years, very quick and perfect support by the team, they helped me man...
Sri Raghav
2 days ago
The service is good...
The service is good. They are answering with patience and doing the needful as soon as possible....
MR
2 days ago
Perfect and Valuable Server + ...
I am using MilesWeb Servers, The main thing which I getting are continuous support over everything w...
Gunjan Makwana
3 days ago
Very quick and helpful assista...
Very quick and helpful assistance. Support person listened properly and provided a nice solution....
Narendra
4 days ago
positively helped me with find...
positively helped me with finding insecure content on my website causing SSL to not work properly on...
Thaviraj Junglee
4 days ago
Exceptional support, Truly Pra...
I had opted for the basic wordpress hosting plan as I intended to experiment with various plug-ins. ...
Aseem Chandna