Overview

Most PHP applications (eg WordPress) set the required date/time within the application, so that it’s a user configurable option.

However, some apps require this to be set at a server level within the PHP settings.

If the application cannot be updated, you can set a default timezone per site within Plesk as detailed below.

Instructions

  1. Login to Plesk or the Conetix Control panel, then select the domain you need to set the PHP timezone for.
  2. Select Files:
    set php timezone for a website
  3. Use the Plus icon (+) then select Create File:
    set php timezone for a website
  4. Create a file called .user.ini (noting the dot(.) at the front).
  5. Click on the file to open in the code editor:
    set php timezone for a website
  6. Within the code editor, add the required timezone:
    date.timezone = "Australia/Sydney"
    (this can be any valid PHP Timezone)

  7. Save the file.
  8. Go to the PHP area within the Dev Tools:
    set php timezone for a website
  9. Click on the View the phpinfo() page link:
    set php timezone for a website
  10. Scroll down to the date section to confirm your selected timezone is set:
    set php timezone for a website
Was this article helpful?

Related Articles