To transfer the PHP Live! system to a new server, there are basically three steps:
- Move the PHP Live! files to the new server.
- Edit the configuration file to match the new server. (phplive/web/config.php)
- Export the PHP Live! MySQL database and import to the new database on the new server.
1. Move the PHP Live! files to the new server:
- Compress your entire phplive/ directory using ZIP or tar.
- FTP the compressed file to the new server location.
- Decompress the file.
2. Edit the configuration file to match the new server:
- Edit the PHP Live! config file phplive/web/config.php file on the new server.
- Update the domain, file path and MySQL information to reflect the new server settings. The variables that requires change are:
$CONF['DOCUMENT_ROOT'] = addslashes( '/new_server_web_directory_path/phplive' ) ;
$CONF['BASE_URL'] = '//www.new-website-url.com/phplive' ;
$CONF['SQLHOST'] = 'new_db_host' ;
$CONF['SQLLOGIN'] = 'new_db_login' ;
$CONF['SQLPASS'] = 'new_db_password' ;
$CONF['DATABASE'] = 'new_db_name' ;
3. Export the PHP Live! MySQL database and import to the new database on the new server. There are couple ways to do this:
- Contact the server admin to zip or tar up the entire PHP Live! database and decompress it on the new server's MySQL directory where other databases are located. A restart of the MySQL server is required so that the MySQL server recognizes the new database. In some server environments, you may need to actually create the database in order for the MySQL server to recognize the new database. In these situations, have your server admin export the PHP Live! database with mysqldump command and then import the data on the new server.
- Using MySQL front-end tool (such as PHPMyAdmin), export the entire database to a file, both the structure and the data. On the new server, create a new database and then import the text file containing the entire PHP Live! data. You can either use the upload file option or open the file and copy/paste the entire content and paste it into the SQL query window at the new database using a MySQL front-end tool.