Switch PHP and WordPress Versions on a Local Site

Every WP Staging CLI site runs on the PHP and WordPress versions you chose when you created it. When you need to test a plugin update or a PHP compatibility issue, you can switch either version later — the site keeps its files, database, and domain.

Before You Start

  • WP Staging CLI is registered with your license.
  • The site exists — check with wpstaging list.
  • For work you cannot afford to lose, create a WP Staging backup of the local site first.

Switch the PHP Version

Run a site on a different PHP version without recreating it:

wpstaging wp mysite.local core version
wpstaging wp mysite.local core check-update
wpstaging add client-php81.local --from=./client.wpstg --php=8.1
wpstaging add client-php83.local --from=./client.wpstg --php=8.3
wpstaging add client-php84.local --from=./client.wpstg --php=8.4
wpstaging add mysite.local --php=8.3 --wp=6.7
wpstaging switch-wp mysite.local 6.8
wpstaging switch-php mysite.local 8.4

Updated on October 29, 2026

Rene Hermenau

Author: Rene Hermenau

About the author: René Hermenau is the founder of WP STAGING. He works on WordPress backups, staging, migrations, database handling, and safe deployment workflows.