# Copy PHP settings from one site to another

Copy the PHP worker settings of one site and paste them on another site or server, see exactly what changes first, and keep each site's own account.

A site that runs well gives you settings worth reusing: how many PHP workers it keeps, how long a page may run, which PHP values it sets. Fuzops copies them as plain text, so you can paste them on another site, on another server, or keep them in your notes.

## What you need

- A role that may change sites and read their secrets: owner, admin or developer.

## Steps

1. **Open the source site.** Go to the site's **Settings** › **PHP settings**. The page opens on **The pool file**: the PHP-FPM pool the site runs in, as it is on the server.

   ![The pool file of a site, with Copy settings and Paste settings above it](https://internal.fuzops.com/docs-img/site-php-pool.webp)

2. **Copy the settings.** Choose **Copy settings**. You get the worker lines (`pm`, `pm.max_children` and the others), the hard stop for a stuck page (`request_terminate_timeout`) and any `php_value` lines. The pool name, the account and the socket are left out, because they belong to the site's own account.

3. **Paste them on the other site.** Open the other site's **PHP settings** and choose **Paste settings**. Paste the text (a whole pool file from anywhere works too), then choose **Show what changes**.

   ![Paste settings: each setting before and after, and the lines that were left out](https://internal.fuzops.com/docs-img/site-php-paste.webp)

4. **Read the preview.** Each setting is listed with its value now and after. Lines that were left out are listed with the reason. If the workers would not fit in the memory PHP has on that server, you see the recommended number and choose between it and the pasted one.

5. **Choose Check and apply.** PHP-FPM checks the new file first. If the check fails, the previous file is put back and the line it refused is shown.

Instead of copying and pasting, you can also choose **Copy from another site…** on the target, or **Apply these settings to other sites…** on the source to change several sites at once.

## What you should see

The target's **The pool file** shows the new worker lines, with its own pool name, account and socket unchanged. Every site of the same account on the same PHP version uses the pool, and the page lists them.

## What is never copied

| Lines | Why |
| --- | --- |
| Pool name, `user`, `group`, `listen` and the other `listen.*` lines | They belong to the site's own account. |
| `env[...]` | They can hold passwords. Set them on the site's **Environment** page. |
| `include`, `chroot`, `chdir`, `prefix`, folders and log paths | Folders belong to the account. |
| `open_basedir`, `disable_functions`, `auto_prepend_file`, extensions | Security settings and code run on every page stay with each account. |

## If it goes wrong

- **The numbers do not fit together**: with "Keeps some workers ready" (`pm = dynamic`), the fewest idle workers must be at most the workers started with PHP, which must be at most the most idle workers, which must be at most the most workers at once. Fix the pasted text and show the changes again.
- **PHP-FPM refused the file**: the page shows its message and the line. The previous file stayed in use, so the site kept answering.
- **The php.ini values** (memory per page load, longest a page may run, largest upload) are per PHP version on a server: copy them with **Copy PHP settings** in the server's **PHP settings** dialog and paste them there.
