Print

SiteGround Tutorials



Textpattern Tutorial

What is Textpatern

Textpattern is a lightweight CMS. It is mostly popular due to its low system requirements and possibility to modify it in any way you like. Certain web site design knowledge is required in order to build successful web sites with Texpattern. Mostly you need to be familiar with CSS, PHP basics and HTML code. In this tutorial we will show how you can perform a Textpattern installation and further manage your web site as well as install additional plugins and custom designed templates.

 

Textpatern Features:

  • Visitors and referrers logs
  • Conversion of plain text to XHTML using textile
  • Possibility to setup privileges hierarchy for users
  • Browser-based template and CSS editing
  • Browser-based plugin installation and maintenance
  • Built-in search engine
  • Password protection for articles or site sections

 

Our tutorial covers the following topics:



TextPattern Installation Tutorial

Requirements:

Here are the server requirements needed to run Textpattern. They are fully met on all SiteGround servers:

  • PHP 4.3+
  • MySQL 3.23+
  • The PHP mysql extensions
  • The PHP XML Extension

And here are the recommended settings, also available on all SiteGround servers:

  • PHP 4.4.1+ or 5.0.2+, in mod_php or fastcgi mode
  • MySQL 4.1.7+
  • PHP extensions: mbstring, XML, Zlib
  • Apache 1.3+ with mod_rewrite
  • A Unix server OS with locale support

To start the installation, you should access the directory where you have uploaded the installation package via your web browser. A blank page with only one link pointing to the installation setup will load.

Alternatively you can access the setup directly via:

http://yourdomainname.com/textpattern_install_dir/textpattern/setup/

Where 'yourdomainname.com' is your actual domain name and 'textpattern_install_dir' is the sub-directory of public_html where you have uploaded the installation files.

On the next page you can choose the default Language for the installation. Note that the language pack will be applied to the whole administrator backend as well as to the front end.

Choose the desired language from the drop down menu and click submit. For the purpose of this tutorial, we'll choose English.

On the next page you should enter the database details for the new installation. Use the details for the database and the user you have already set up.

Here is the data you need to enter:

  • MySQL login - This is the MySQL username you have added with full privileges to the database.
  • MySQL password - The password for the user you have created
  • MySQL server - this should remain localhost
  • MySQL database - The name of the database you have created for the installation.
  • Table prefix - this field can remain empty (considering you are using a new database)
  • Site URL - This should automatically get your actual site URL - the one you have used to access the installation.

Once you have entered the needed details you can click the Next button.

The next step will verify the database login details and if everything is in order, you will be provided with the content of the configuration file for the application. You should copy this content, then create the file config.php using it and place it as instructed by the installation. Once you are ready, click the "I did it" button.

Next you will be asked to set the administrative details for the installation. Fill in the fields and click Next.

This is all. The next page should display that the database tables were successfully created and populated. Also you will be provided with a Link to the administrative area for the application.

 Here you can see a video of a TextPattern installation that goes through the steps described above:

The SiteGround.com video content presented here requires a more recent version of the Adobe Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.



Textpattern Template Tutorial

The textpattern template installation is generally a straight-forward process. However, there are at least several steps that need to be accomplished. There is no automatic installer available and each step should be performed separately. Each Textpattern template includes a file with detailed instructions how exactly to perform the installation. In all cases you need to follow those instructions.

Here is a general overview what the template installation procedure includes.

Step 1. First of all, it is imperative to create a backup of your TextPattern web site. Both the files and the database should be backed up in case anything goes wrong.

Step 2. Download the desired template and extract it locally on your computer (most commonly the template installation files will come in an archive). By default the extracted folder will contain a file named "Instructions" where the exact steps needed to install the template are provided.

Each of the following 4 steps are accomplished via the functionality provided under the TextPattern admin area -> Presentation. This is where the look and feel of the site is adjusted.

Step 3. You will need to edit or add new Pages to the current installation.

Step 4. You will need to edit the existing or add new Forms.

Step 5. Also you will need to make similar modifications under Style.

Step 6. Finally you will have to create new sections or edit the options for existing ones.

You might also need to:

Step 7. Install new custom plugins needed for the template to work properly.

Step 8. Copy over images from the template installation package under your TextPattern installation. You will need to upload those via FTP or cPanel -> File Manager.

Those are the standard steps that you will need to take in order to install a TextPattern template. Note that one or more of those steps might not be included. This depends on the template you are installing.



Textpattern Plugins Tutorial


In order to install additional plugins for the Textpattern CMS there are several steps you should take.

First you need to log in with the administrative login details for the installation.

Once logged in, navigate to the Admin tab and then click the plugins sub-tab.

You need to copy the complete plugin source code and paste it in the text field, then click Upload. Note that the plugin installation code may be encrypted. This will not be a problem - the installer will properly parse it for you.

On the page that loads you will be provided with the complete plugin code as well as the help available for it. Then you need to click install. The plugin will be automatically added to your application.

Note that once the plugin is installed, you will need to activate it. This can be done by clicking 'No' under Active for the plugin. This will change the status to yes and the plugin will be active for your web site.

 

The SiteGround.com video content presented here requires a more recent version of the Adobe Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.



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.php

Note 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.

  • Creating 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.



TextPattern Upgrade Tutorial

The text pattern upgrade is an automated process and generally includes only overwriting the old files with the ones from the new release. Here are the steps that need to be followed:

Step 1. First of all it is imperative to create a backup of your TextPattern web site. Both the files and the database should be backed up in case anything goes wrong.

Step 2. Download the latest TextPattern version package to your local computer and extract it.

Step 3. Upload the following files/folders under your TextPattern installation folder overwriting those from the old installation:

  • index.php and .htaccess in the main TextPattern directory
  • everything under the 'terxtpattern' folder (except config.php which is not included in a fresh installation package anyway).
  • everything under the 'rpc' folder.

Step 4. When you are ready, access the administrator backend. The upgrade script will be run automatically upon login.

Step 5. It is recommended to check Diagnostics under the Admin tab for any issues. Also you can verify there that the web site is now running the latest TextPattern version.