How do I move a site from the local machine to a hosting or from one hosting to another?
Different scenarios are possible here.
1. Using the built-in back-up system
- in Control Panel, select: Settings – Tools – Back-Up
- enable the “ Back up gradually“ option, choose the required settings and create the site archive copy
- upload the archive to the remote server and set the public read/write/execution permission (0777)
- upload the restoration script to the server (you can download it by right-clicking the link at the bottom of the back-up creation page)
- open http://<your site>/restore.php in your site and follow the instructions
- specify the database connection settings in bitrix/php_interface/dbconn.php
2. Using the conventional tools and special scripts
- upload all the scripts to your site via FTP and set the public read/write/execution permission (0777)
You can do the following for quicker deploying:
- Download http://www.bitrixsoft.com/examples/mkinst.php and put it to the local site root.
- Now you have to upload all the files from the local folder. You should upload only files whose size does not exceed the PHP memory limit imposed by the remote server (usually 8 MB). If any of the files exceeds the limit (e.g. a database dump file), move them to a temporary location. The system distribution package does not contain such files.
- Open http://your_local_site/mkinst.php in your browser.
- Upload install.gz to the remote site root using FTP.
- Download http://www.bitrixsoft.com/examples/install.php
- Upload this file to the remote site root.
- Type http://your_remote_site/install.php in your browser.
- Remember to delete mkinst.php and install.php from a remote server. Also delete install.gz or move it to an inaccessible folder.
- Create a database dump. For example, you can use phpMyAdmin or the standard MySQL tool:
mysqldump.exe —add–drop–table –p <LOCAL_DATABASE_NAME> > bitrix.dmp
If it fails, refer to the mysqldump.exe help:
mysqldump.exe –? - All servers usually offer phpMyAdmin for database management. If not, copy bitrix.dmp using FTP to the remote server and connect to the latter via SSH. Execute the following command: mysql –u <USER_NAME> –p <PASSWORD> <DATABASE_NAME> < bitrix.dmp
- specify the database connection settings in bitrix/php_interface/dbconn.php.
3. Using the UNIX system tools
- connect to the remote server via SSH and go to the site root: cd <site_root_path>
- create a database dump by running the MySQL tool: mysqldump –h<DBHost> –u<DBLogin> –p<DBPassword> <DBName> > mysql_data.sql (the values of DBHost, DBLogin, DBPassword,DBNamecan be taken from bitrix/php_interface/dbconn.php)
- create the archive using tar: tar czf site.tgz . (the last dot is required because it specifies the current directory)
- upload site.tgz to the remote site root via FTP and unpack via SSH: tar xzf site.tgz
- deploy the database: mysql -h<DBHost> –u<DBLogin> –p<DBPassword> <DBName> <mysql_data.sql (contact the hosting provider for the values of DBHost, DBLogin, DBPassword, DBName)
How do I move a site from the local machine to a hosting or from one hosting to another?
Different scenarios are possible here.
1. Using the built-in back-up system
- in Control Panel, select: Settings – Tools – Back-Up
- enable the “ Back up gradually“ option, choose the required settings and create the site archive copy
- upload the archive to the remote server and set the public read/write/execution permission (0777)
- upload the restoration script to the server (you can download it by right-clicking the link at the bottom of the back-up creation page)
- open http://<your site>/restore.php in your site and follow the instructions
- specify the database connection settings in bitrix/php_interface/dbconn.php
2. Using the conventional tools and special scripts
- upload all the scripts to your site via FTP and set the public read/write/execution permission (0777)
You can do the following for quicker deploying:
- Download http://www.bitrixsoft.com/examples/mkinst.php and put it to the local site root.
- Now you have to upload all the files from the local folder. You should upload only files whose size does not exceed the PHP memory limit imposed by the remote server (usually 8 MB). If any of the files exceeds the limit (e.g. a database dump file), move them to a temporary location. The system distribution package does not contain such files.
- Open http://your_local_site/mkinst.php in your browser.
- Upload install.gz to the remote site root using FTP.
- Download http://www.bitrixsoft.com/examples/install.php
- Upload this file to the remote site root.
- Type http://your_remote_site/install.php in your browser.
- Remember to delete mkinst.php and install.php from a remote server. Also delete install.gz or move it to an inaccessible folder.
- Create a database dump. For example, you can use phpMyAdmin or the standard MySQL tool:
mysqldump.exe —add–drop–table –p <LOCAL_DATABASE_NAME> > bitrix.dmp
If it fails, refer to the mysqldump.exe help:
mysqldump.exe –? - All servers usually offer phpMyAdmin for database management. If not, copy bitrix.dmp using FTP to the remote server and connect to the latter via SSH. Execute the following command: mysql –u <USER_NAME> –p <PASSWORD> <DATABASE_NAME> < bitrix.dmp
- specify the database connection settings in bitrix/php_interface/dbconn.php.
3. Using the UNIX system tools
- connect to the remote server via SSH and go to the site root: cd <site_root_path>
- create a database dump by running the MySQL tool: mysqldump –h<DBHost> –u<DBLogin> –p<DBPassword> <DBName> > mysql_data.sql (the values of DBHost, DBLogin, DBPassword,DBNamecan be taken from bitrix/php_interface/dbconn.php)
- create the archive using tar: tar czf site.tgz . (the last dot is required because it specifies the current directory)
- upload site.tgz to the remote site root via FTP and unpack via SSH: tar xzf site.tgz
- deploy the database: mysql -h<DBHost> –u<DBLogin> –p<DBPassword> <DBName> <mysql_data.sql (contact the hosting provider for the values of DBHost, DBLogin, DBPassword, DBName)
How do I move a site from the local machine to a hosting or from one hosting to another?
Different scenarios are possible here.
1. Using the built-in back-up system
- in Control Panel, select: Settings – Tools – Back-Up
- enable the “ Back up gradually“ option, choose the required settings and create the site archive copy
- upload the archive to the remote server and set the public read/write/execution permission (0777)
- upload the restoration script to the server (you can download it by right-clicking the link at the bottom of the back-up creation page)
- open http://<your site>/restore.php in your site and follow the instructions
- specify the database connection settings in bitrix/php_interface/dbconn.php
2. Using the conventional tools and special scripts
- upload all the scripts to your site via FTP and set the public read/write/execution permission (0777)
You can do the following for quicker deploying:
- Download http://www.bitrixsoft.com/examples/mkinst.php and put it to the local site root.
- Now you have to upload all the files from the local folder. You should upload only files whose size does not exceed the PHP memory limit imposed by the remote server (usually 8 MB). If any of the files exceeds the limit (e.g. a database dump file), move them to a temporary location. The system distribution package does not contain such files.
- Open http://your_local_site/mkinst.php in your browser.
- Upload install.gz to the remote site root using FTP.
- Download http://www.bitrixsoft.com/examples/install.php
- Upload this file to the remote site root.
- Type http://your_remote_site/install.php in your browser.
- Remember to delete mkinst.php and install.php from a remote server. Also delete install.gz or move it to an inaccessible folder.
- Create a database dump. For example, you can use phpMyAdmin or the standard MySQL tool:
mysqldump.exe —add–drop–table –p <LOCAL_DATABASE_NAME> > bitrix.dmp
If it fails, refer to the mysqldump.exe help:
mysqldump.exe –? - All servers usually offer phpMyAdmin for database management. If not, copy bitrix.dmp using FTP to the remote server and connect to the latter via SSH. Execute the following command: mysql –u <USER_NAME> –p <PASSWORD> <DATABASE_NAME> < bitrix.dmp
- specify the database connection settings in bitrix/php_interface/dbconn.php.
3. Using the UNIX system tools
- connect to the remote server via SSH and go to the site root: cd <site_root_path>
- create a database dump by running the MySQL tool: mysqldump –h<DBHost> –u<DBLogin> –p<DBPassword> <DBName> > mysql_data.sql (the values of DBHost, DBLogin, DBPassword,DBNamecan be taken from bitrix/php_interface/dbconn.php)
- create the archive using tar: tar czf site.tgz . (the last dot is required because it specifies the current directory)
- upload site.tgz to the remote site root via FTP and unpack via SSH: tar xzf site.tgz
- deploy the database: mysql -h<DBHost> –u<DBLogin> –p<DBPassword> <DBName> <mysql_data.sql (contact the hosting provider for the values of DBHost, DBLogin, DBPassword, DBName)