Sites
Moving a site from another server
luckybx site import shop.example.com --from root@old-serverWorks with BitrixVM, normal hosting with SSH access and another server with LuckyBX. Nothing changes on the old server: files and the database are only read.
What happens#
- LuckyBX looks for the site on the old server. If it is not found, give the folder with the
--pathkey. - It checks whether there is enough space.
- It copies the files and the database.
- It switches the site to the new database, cache and push and removes the old server's settings.
Useful keys#
--port 2222: the SSH port, if it is not 22.--path /var/www/site: the site folder on the old server.--old-domain old.example.com: the domain on the old server, if it is different.--php 8.3: the PHP version on the new one.
Check before switching the domain#
Put the new server's address in the hosts file on your computer and open the site. When everything is fine:
- Switch DNS to the new server.
- Issue a certificate.
- Turn off the site's cron on the old server so that letters and jobs do not run twice.
Moving from a ready copy#
If you already have a folder with the files and a database dump:
luckybx site import shop.example.com --from /root/copy --dump /root/db.sql.gznginx does not read .htaccess. If it has your own rules, the command reminds you of that. Then turn on Apache for the site.