lcp

How to transfer Textpattern website?

In this tutorial we are going to show you how to transfer your TextPattern website from another server. The first thing you will need to do is copy all your website files using FTP client. To copy the files via FTP, you can follow up our FTP video tutorials at:

https://tmdhosting.com/tutorials/video/ftp.html

The second step is to export your website database. You can find the name of your database within the config.php file of your Textpattern website. The file is located in:

/path-to-textpattern/textpattern/config.php

The database name is located in the following line:

$txpcfg[‘db’] = ‘db_name

The text between the second quotes is the name of your site database. Now you can export the database using tool like phpMyAdmin. To export a MySQL database using phpMyAdmin you can follow our video step by step tutorial here:

https://www.tmdhosting.com/tutorials/video/phpmyadmin/phpma-export.html

The next step is to create new MySQL database within your cPanel. You can easily create new database using the MySQL Database Wizard. Simply click on its icon and it will guide you through the whole process. You can also follow our video tutorial here:

https://www.tmdhosting.com/tutorials/video/cpanel/cpanel-x3-createmysql.html

Once you have the new database created it will be completely empty. Use phpMyAdmin to import the backup of your database that you downloaded earlier. To import the database go to your phpMyAdmin and click on the database name. Then click the “Import” tab. Choose the file from your local computer and wait for the import to complete. You can also follow our video tutorial here:

https://www.tmdhosting.com/tutorials/video/phpmyadmin/phpma-import.html

Now the final step is to update the config.php file of your TextPattern website. Open the file using text editor like notepad and edit the following lines:

$txpcfg[‘db’] = ‘db_name’;
$txpcfg[‘user’] = ‘db_user’;
$txpcfg[‘pass’] = ‘db_pass’;
$txpcfg[‘host’] = ‘localhost’;

Change db_name, db_user and db_pass respectively with your database name, database user and database password that you created earlier. Save the file and upload it on the server again. Make sure that the updated version of the file is present in your account.