Moving to another server
How to move a Flute 2.0 site to a new server on the same domain: what to copy, which PHP, ionCube and cron it needs and how to check the site after the move.
The site moves as a whole: the site folder and a database dump. On the new server it recognises itself by the application key in config, so the licence and paid modules keep working without connecting again. After the move the "Environment" tab in the admin panel shows whether the server is in order and what to fix.
This page covers the same domain on a new server. If the domain changes too, move the site first and then change the domain.
What to copy
You need the whole site folder and the database. The folder holds config with the application key, storage with the licence confirmation and public/assets/uploads with uploaded files, so copy all of it. On the old server:
cd <SITE_DIR>
tar czf ~/flute-site.tar.gz .
mysqldump --single-transaction -u <DB_USER> -p <DB_NAME> > ~/flute.sqlOn hosting with a control panel, do the same with an archive in the file manager and a database export in the databases section.
On the new server, unpack the archive into the site folder and load the dump into a new database. If the database name, user or password changed, fix them in config/database.php.
Do not reinstall 2.0 for the move
A clean install has its own application key. Load the old database into it and the site cannot decrypt its installation key, so paid modules stop. Move the folder whole, together with config.
Server
Any server from the requirements will do: PHP 8.2 or newer with the same extensions as on the old one. The PHP version may differ from the previous one. Paid modules are encoded for a PHP version, so after moving to another version press "Download again" on the "Environment" tab and the site downloads packages built for the new server.
Paid modules need the ionCube Loader for the PHP version the site runs on (how to enable it). The loader does not load into FrankenPHP; use PHP-FPM.
Cron
The scheduler has to be added on the new server again, it does not travel with the files. Add the line to the crontab of the same user PHP runs the site as:
* * * * * cd <SITE_DIR> && php flute cron:run >> /dev/null 2>&1Cron handles the sync with the platform and the licence confirmation. Without it paid modules run on the last confirmation for a while and then stop. If cron runs as another user, root for example, it creates folders the site then cannot read.
After the move
Point the domain at the new server and open AdminErrorsEnvironment. The tab checks the domain, the platform link, the ionCube Loader, the package build, write access, cron and modules. When everything is fine, the top reads "All good: the site, licence and modules work on this server".
If something is wrong, the problem sits at the top with advice, sometimes with a button or a ready command. After a move you most often see one of the messages below.
Troubleshooting
Look up other messages in the error search.
The site cannot decrypt its installation key. This happens when the application key changed during the move. Connect the site again.
The new server has a different config/app.php from the old one. Press "Connect" and connect the site to your account again. Paid modules then download for the new installation on their own.
| Message | What to do |
|---|---|
| "Packages are built for another server, PHP version or domain: …." | press "Download again" next to the check |
| "The ionCube Loader is not installed, so encoded modules do not work: …. Install it following the guide." | enable the ionCube Loader for your PHP version and restart PHP |
| "The folders … belong to another user. This happens when cron runs as a different user than the site. Give them back to the PHP user." | run the chown command the check shows and move cron to the site user |
| "PHP cannot write to …. Give the folders back to the PHP user with this command." | run the chown command shown |
| "Cron has never run. Add this line to the crontab of the site user." | add the line from the Cron section |
| "FrankenPHP runs in worker mode, where encoded modules do not start: …. Turn the worker off or remove these modules." | run the site under PHP-FPM |