Texpattern Backup and Restore Tutorial
Creating a backup of your Textpattern installation includes 2 major steps. Backing up the Textpattern installation database and the web site files for it. Both steps are reviewed in details below.
Creating Textpattern Database Backup.
There are 2 possible ways to create the backup using the tools provided by SiteGround. First of all you need to make sure which is the database used by your installation. This information can be acquired by checking the Textpattern configuration file. The file in question is in a sub-directory for your Textpattern installation:textpattern/config.phpNote that this is a folder named textpattern that resides inside the actual textpattern installation folder.The information that we need is the 'db' variable. Here is a sample line that stores the needed information:$txpcfg['db'] = 'user_sgtp';In the particular case the database is 'user_sgtp'. Note that user will be your cPanel username (all databases for your account will have this prefix) and sgtp is the actual name specified for the database when it was created. So in the particular case we need to create a backup for the user_sgtp database. As mentioned there are 2 ways to create the backup.1. Use the cPanel backup functionality. To do so, log in to cPanel for your account -> Backups. Under Download a MySQL Database Backup all databases for your hosting account will be listed. Click on the database name and a download window will pop up. Use it to download and save the backup locally to your computer. This is the preferred option for creating the backup.2. You can also use cPanel -> phpMyAdmin in order to create the backup of the database. Detailed tutorial how to do so can be found here. Note that this option is less reliable and you might experience issues downloading larger databases via phpMyAdmin.
CCreating Textpattern Website Files Backup.
Prior to downloading the web site files backup it is advisable to create an archive of the files. It is not a mandatory step but it helps for easier upload/download. Downloading a single archive file will be always faster than downloading all the files one by one.To create an archive of your textpattern installation files follow these steps:
- Login to cPanel for your account.
- Choose File Manager.
- Navigate to the installation directory (note that if the Textpattern CMS is accessible directly via your domain name the installation directory is public_html).
- You can use the 'Select all' button to select all files in the directory (it might be a good idea to exclude files and folders that are not from the installation. For example, other script installation sub-directories).
- Click the 'Compress' button. You will be asked for the directory where you would like the archive saved.
To download the backup of your Textpattern you can use either FTP client or cPanel -> File Manager. If you have stored it under the web root for your account you will be able to download the archive directly via HTTP download (pointing your web browser to the archive URL). Please note however that this is not recommended as it might be a major security issue.