GoAdmio

restart

Restart every PHP-FPM version, then the active web server (Apache or Nginx), in one command

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/restart is a shortcut for the two commands you usually run together after a server-level change to PHP or the web server. It runs them one after the other:

  1. fpm, which restarts all installed PHP-FPM versions
  2. web, which restarts the active web server

Restarting stops and starts the services, so sites are briefly unavailable. When you only changed configuration, reload is usually the gentler choice.


Quick start

/go/restart

Syntax

/go/restart
Form Behavior
/go/restart Restarts PHP-FPM, then the web server.

The command takes no arguments. Anything you add is written to the log and otherwise ignored. To restart only one of the two services, run fpm or web on its own. Run it as root, or as a user who can use sudo.


Options

None.


Output

/go/restart prints nothing itself. You see only what fpm and web print.

Notes on the output:


Examples

# Restart PHP-FPM and the web server
/go/restart
# Apply a configuration change without a full restart
/go/reload
# Restart only one of the two
/go/fpm
/go/web

Troubleshooting

Symptom Likely cause Fix
Sites show 502 or 503 for a few seconds PHP-FPM or the web server is restarting. Expected. Wait a moment, or use reload next time.
Sites stay down after the restart One of the two services didn't start. Run fpm and web separately to see which one fails, and check status.
PHP-FPM doesn't start A broken php.ini setting. Run checkphpini.
The web server doesn't start A broken virtual host, for example a missing SSL certificate. Run checkapache or checknginx.
A configuration change has no effect The web server or PHP-FPM configuration wasn't rebuilt. Run conf, then restart.
Pages are slow right after the restart PHP's opcode cache is emptied when PHP-FPM restarts. Expected. It refills as pages are visited.
You want to restart only one service restart has no options. Use fpm or web.

Details

What happens on each run

flowchart TD
    A["restart"] --> B["Log the call"]
    B --> C["fpm: restart all PHP-FPM versions"]
    C --> D["web: restart the active web server"]

The two steps always run in this order, and the second runs even if the first fails.

Restart, reload, and the single-service commands

Command What it does
restart Restarts PHP-FPM, then the web server.
reload Reloads PHP-FPM and the active web server.
fpm Restarts all installed PHP-FPM versions.
web Restarts or reloads the active web server.

What is not restarted

Only PHP-FPM and the web server. The database, mail services, and cron are not touched.


See also

Command Description
reload Reload PHP-FPM and the active web server
fpm Restart all installed PHP-FPM versions on your server
web Restart or reload the active web server
conf Rebuild Apache/Nginx virtual hosts, PHP-FPM pools, and SSL for all accounts
status Collect the status of every systemd service
checkphpini Scan every php.ini for startup errors and delete the line that causes each one