How to set PHP timezone in cPanel

You can configure the cPanel PHP settings to use your local time zone by setting the date.timezone directive either in the .user.ini file or through the MultiPHP INI Editor in cPanel.

How to Change date.timezone on cPanel Hosting

You can configure your PHP settings to use your local time zone by setting the date.timezone directive either in the .user.ini file or through the MultiPHP INI Editor in cPanel.

Method 1: Using .user.ini File

  1. Log in to your cPanel and open File Manager.

  2. Navigate to the public_html directory of your website (or yourdomain.com for addon domains).

  3. Click on the Settings button and enable Show Hidden Files (dotfiles).

  4. If the .user.ini file does not exist, create it using the + File button.

  5. Add the following line and save the file:

    date.timezone = "Asia/Kolkata"
  6. Replace Asia/Kolkata with your preferred time zone.

You can find the complete list of supported PHP time zones in the official PHP documentation.

Method 2: Using MultiPHP INI Editor

  1. Navigate to cPanel → MultiPHP INI Editor.

  2. Select Editor Mode.

  3. Choose your domain from the dropdown.

  4. Add the following line and click Save:

    date.timezone = "Asia/Kolkata"

That’s all!