How to Backup Textpattern

It’s always a good idea to create backups of any website platform whether you use Textpattern or not. It will save a lot of time for recovery in the event something happens. This is especially true when using Textpattern as it can be easy to damage the site through incorrect coding.

In this tutorial, I’m going to show you perhaps one of the easiest ways to backup your Textpattern website. It will be in two parts: files and database. You will need both if you want to truly keep your site protected from lost data.

You should create a backup of your site before adding plugins or installing templates. That way, you can restore Textpattern quickly from the copy in the event the site breaks from incorrect coding.

Backing Up Your Textpattern Files

In this backup Textpattern tutorial, I’m going to demonstrate how to create a ZIP archive of your entire site in cPanel. This makes data transfer incredibly easy and will help in a speedy restore of Textpattern.

Click the “File Manager” from the cPanel dashboard.

Go to the “public_html” directory for your website.

Select all of the files and folders for your website. You can do this by clicking the “Select All” tool above the file window.

Right-click on any of the highlighted files and select “Compress.” Mac users will use CMD+click.

Choose a compression type from the available list. For this tutorial, I am keeping it easy and selecting “Zip Archive.”

Give the archive a filename ending in “.zip.” Since I am creating a backup, I’m going to name this one: “SiteBackup04242017.zip“.

Verify that all the files and folders are present in the compression window. When you are ready, click the “Compress File(s)” button to create the archive.

The Compression Results window will show how much each file has been compressed and added to the .zip file. Click the “Close” button on the bottom right corner.

Select the backup .zip file you created and click “Download” from the tool bar.

Save the file to a location you can easily find it. I would suggest placing it in a Cloud storage platform like Dropbox. That way, you’ll have a copy on your computer as well as online.

After you’ve downloaded the archive, you should delete the file from your website. With the file still selected, click “Delete” from the tool bar.

If you want an exact copy of your site without compressing the data into a zip file, you can always use an FTP program like FileZilla to download the files and directories. However, this won’t help you get the database. You will still need to follow the next part of this tutorial.

Backing Up the Database

Backing up the database is a bit different than the files and directories. In some ways, it’s a bit easier.

First, you will need to know the name of the database you’re using. If you only have Textpattern installed, this is quite easy. It will be the only one listed in phpMyAdmin.

But if you need to know the name of your database and didn’t write it down when you installed Textpattern, you can see the name in the config.php file. This can be done from the File Manager in cPanel. Highlight config.php and click “Edit” from the tool bar.

In the editor, you will see how Textpattern accesses the database. You are looking for the name followed by the ‘db’ section of code. This is the name of the database you will need to access.

Once you have the database name, you can close out of this screen. Make sure you don’t save any changes by accident.

From the cPanel dashboard, click phpMyAdmin to open your databases.

Click on the database for your Textpattern website in the left panel.

Click the “Export” option along the top of the database tables.

Keep the Method set to “Quick” and the format as “SQL” and click “Go.”

You will then save the SQL file onto your computer. Again, I suggest saving it somewhere easy to remember or putting the file into something like Dropbox.

Once you save the file, you can exit phpMySQL.

Keeping a backup of Textpattern is ideal for many reasons. It’s an excellent way to protecting your hosted website from a myriad of problems. Whether it’s restoring from a hack or fixing coding issues on the site, backup files are extremely useful. Never assume that your site is always safe from corruption. Make it a habit to routinely backup Textpattern.

My name is Josh Dargie and I’m the Operations Manager at GreenGeeks. I’ve been with the company since 2009. I have over 16 years of experience working with and for various web hosting providers specifically in development, day-to-day operations and customer service.