Last verified ·
PHP2Shell step-by-step response
Commands are examples for the stated environment. Match the branch, service and paths to your site; prepare a backup and a maintenance window before changing production.
Find the Web runtime
WordPress: Tools > Site Health > Info > Server. In a panel, select the domain and its assigned handler. With SSH, map the vhost/socket to its FPM service or container. php -v and php --ini describe CLI only. Never publish phpinfo().
CLI / systemdphp -v php --ini ps -eo pid,lstart,args | grep -E '[p]hp-fpm|[a]pache2|[h]ttpd' systemctl list-units --type=service --all | grep -E 'php.*fpm|apache2|httpd'Prepare a recoverable change
Save site files, database, PHP configuration, extensions and the current image/package revision. Test restoring a copy. Record login, upload, checkout and scheduled-job checks before the change.
BaoTa Linux: update the right branch
Software Store > Installed > refresh the software list > the site’s PHP branch > Update. Installing the PHP security update does not require a panel upgrade or paid enterprise plan. Update every branch in use, then restart it and verify each site.

BaoTa official documentation: the PHP update entry (Chinese interface). Menus vary by release. Source and original image belong to BaoTa. Separate vendor backports from upstream releases
BaoTa lists Linux 7.4.34, 8.0.31 and 8.1.35 as vendor fixes. They do not restore upstream support. Its PHP 5 builds are test releases; Windows 8.1 and older are not covered by those Linux packages. Confirm the vendor’s exact scope before deployment.
1Panel and other runtime panels
Find the runtime/container assigned to the target site. Use its vendor-supported update/rebuild procedure and preserve volumes, extensions and INI settings. Recreate the PHP runtime, not just the panel. Record the new image/build and verify the domain still uses it.
Replace the processes serving requests
Validate the configuration, then restart the actual FPM service or Apache for mod_php during maintenance. Replace container replicas and restart long-running workers. A configuration saved on disk does not prove old processes have stopped.
PHP 8.3 FPM · Debian / Ubuntusudo php-fpm8.3 -t && sudo systemctl restart php8.3-fpm systemctl is-active php8.3-fpm systemctl show php8.3-fpm -p ActiveEnterTimestamp ps -eo pid,lstart,args | grep '[p]hp-fpm'Verify the fix on the running website
Retain runtime/build evidence for both CVEs, restart timestamps and every pool/replica checked. Re-test business functions and effective temporary settings. A hidden response header or a clean URL-check result proves neither patching nor absence of compromise.
BaoTa & 1Panel
Panel PHP installations can be independent of system PHP. List every installed version and map each site to its assigned runtime. Use the panel’s trusted update channel and verify its package or image contains both CVE fixes; do not assume updating the panel updates PHP. Restart each affected PHP service or recreate the managed container. Check each site again after switching handlers. Panel menu names vary by release.
1. Identify the actual Web runtime
Record the PHP branch, complete package revision, installation source, loaded extensions, service name and site handler. The CLI and Web server may run different binaries. In multi-PHP panels, inspect each site’s assigned handler. Inventory every FPM pool, Apache instance, image, queue worker and deployment replica. Keep a backup and a tested rollback plan before changing production.
3. Restart and verify every instance
Installing a new binary leaves old worker processes in memory until they exit. Restart Apache for mod_php or the corresponding PHP-FPM services and pools. Restart queue workers and scheduled long-running processes too. Verify service start times, Web runtime version, package revision, health checks and every load-balanced replica. Delete any temporary diagnostic page immediately; do not leave phpinfo() publicly accessible.