Skip to content
EuroVPSEuroVPS

How to edit PHP Parameters

EuroVPS FAQ

3 min read

Introduction

Each installed PHP version has its own php.ini. The web server reads it at start, so reload the web server (or PHP-FPM) after every change.

What is phpinfo()

You can use the phpinfo() to verify the changes that you made from the php.ini file. Please create a file with the .php extension (phpinfo.php) in your website document root location with the below noted php script in it.  

<?php phpinfo(); ?>

Change the file permission to 644 and assign user and group ownership for the file as your webuser.

chmod 644 phpinfo.php

chown webuser.webuser phpinfo.php

Open https://yourdomain.com/phpinfo.php and read the 'Loaded Configuration File' row: that is the php.ini to edit.

Editing php.ini file

Edit that file, reload the web server, and confirm the new value in phpinfo().

Editing php.ini in a Plesk Server 

Plesk exposes php.ini settings in the panel, per domain or globally.

  1. Login to Plesk panel using the secure port 8443 https://<server_ip>:8443, you can use the command “plesk login” from the shell to get a one time access URL for the panel.
  2. Click on “Domains” from the left side options pane.
  3. Click on Manage for the selected domain to access the domain specific Plesk panel.
  4. Click on “PHP Settings”.

Edit the common PHP directives from the panel itself or add additional directives in the text box labeled as “Additional configuration directives”

You can follow the below steps from the Plesk panel if you want to make the php changes globally for all the hosted domains in server.

  1. Click on Tools and Settings from the left side options pane
  2. Find and access “PHP Settings”, navigate to php.ini tab.

This will give you the text file representation of the global php.ini file and you can edit the file from here.

Editing php.ini in a cPanel server

On servers that run EasyApache 4, multiple php.ini files manage the system's PHP. Each version of PHP on your server uses its own php.ini file and it is required to make changes to the correct php.ini file to get the updates in the intended PHP version. From the WHM panel navigate to “WHM >> Home >> Software >> MultiPHP INI Editor”, select the PHP version and make the changes and save. This will make the changes applicable globally for all the domain accounts using that PHP version. You can edit the php.ini settings for a specific domain from its cPanel, cPanel >> Softwares >> MultiPHP INI Editor. 

From the EuroVPS FAQ.

More in how to

Your next infrastructure partner

Still have
a question?

Tell us what you are trying to do. An engineer will read it and reply.

+357 222 32280
A EuroVPS engineer carrying a server node on the datacenter floor
A conversation with the people
who will look after your infrastructure.

Let’s start with your setup.

A little context helps us start the right conversation.

We’ll use your details to respond to your enquiry. Privacy policy