How to update PHP version for all domains on Windows

Created:

2016-11-16 13:04:10 UTC

Modified:

2017-08-08 13:43:00 UTC

1

Was this article helpful?


Have more questions?

Submit a request

How to update PHP version for all domains on Windows

Applicable to:

  • Plesk 12.5 for Windows

Question

How to update PHP version for all domains on Windows?

Answer

  1. Retrieve a list of all domains with hosting. Replace the * symbols with your Plesk admin password:

      "%plesk_dir%"\\MySQL\\bin\\mysql.exe -uadmin -p****** -P8306 psa -Ne"select name from domains where htype='vrt_hst'" > C:\\domains.txt
  2. Change your directory to %plesk_cli%

      cd %plesk_cli%
  3. Execute the domain.exe utility:

      for /f "tokens=*" %d in ('type C:\\domains.txt') do domain.exe -u %d -php_handler_id <required_php_handler>

    where <required_php_handler> can be obtained by executing:

      "%plesk_cli%\\php_handler.exe" --list
Have more questions? Submit a request
Please sign in to leave a comment.