From Textpattern CMS User Documentation
Make sure you have the minimum system requirements to run Textpattern.
Then start with the simple instructions below. If you have trouble (unlikely), then look at the detailed instructions further down the page. Upgrading instructions are at the very end.
Simple installation instructions
These instructions are the same as at http://textpattern.com/download, but more user-friendly:
- Download the latest .zip/.gzip package (currently version 4.5.4).
- Create a new folder (e.g., "txp-unzipped") on your local drive, move the zip file into it, and unpack the file tree contents.
- Create an FTP connection to your server (sometimes SFTP is necessary, depending on your host requirements), and move the unpacked file tree to your web domain root (or subdirectory if you plan to run it that way).
- Create a MySQL database and the associated user and password for it.
- Open a web browser and go to domain.tld/textpattern/setup/index.php (or domain.tld/sub-directory/textpattern/setup/index.php if you're running it from a sub directory), where "domain.tld" is your web domain (and "sub-directory" is your actual sub-directory of choice).
- Follow the instructions in the web browser.
Detailed installation instructions
This relates with step 2 in the simple instructions above.
Textpattern is designed to work exactly as the folders and files are organized in the unpacked .zip/.gzip file. Do not move or rename any of the folders or files! Textpattern will not work if you do.
The unpacked file tree described:
textpattern— This is the folder that all the core scripting and functionality
images— This folder is empty by default, but will be utilized later in the course of building your site, particularly if/when using the upload features in the admin-side's Images panel.
files— This folder is empty by default, but will be used if/when you use the upload features in the admin-side's Files panel.
rpc— This folder is where the XML-RPC functionality is kept.
sites— This folder contains a site1 template, and provides support for Multiple websites with a single Textpattern installation.
index.php— The default location of your site; where web users will arrive, and where content publishing happens dynamically.
.htaccess— An important file for many reasons that are out of scope here, but not the least of which is handling URL formatting.
css.php— Handles the site's styles.
README.txt— Provides brief instruction on installing and upgrading.
HISTORY.txt— The installation changelog.
Root or sub-directory installation?
This relates with step 3 in the simple instructions.
If you plan to manage your entire website with Textpattern, then installing in the root domain (e.g., domain.tld) is likely how you'll do it.
If Textpattern will only be used to run a blog—alongside other systems used in website construction, for example—then you may need to install Textpattern in a sub-directory (domain.tld/blog).
FTP or SFTP transfer
This relates with step 3 in the simple instructions.
To get files to your server, you will need to use some form of FTP or Secure-FTP (SFTP). Some web hosts, like Joyent, require SFTP (e.g., Transmit3 for Mac or WinSCP3 for Windows).
Setting up your FTP/SFTP client is beyond scope here, but once done, you should be able to make a connection with your hosted website, and drag/drop your unpacked file tree to the root (or sub-directory) location on your hosted web server.
The setup process
This process relates with step 6 in the simple instructions.
Step 1: Language selection
When you load the setup URL correctly in your browser, you'll see "Welcome to Textpattern" and a drop-down list for choosing a language. This language will be used for the installation screens and as the initial default for your Textpattern user interface.
Step 2: Database setup
Now you will see the database setup screen, where you will add information about your MySQL database, and verify the site paths that it indicates.
This specific step requires you having first done step 4 in the simple instructions. If you haven't done that at this point, stop with the setup process and go do the following:
- Use phpMyAdmin, for example, to create a database for your Textpattern installation and give it a name.
- Create a database user and associated password. Give the account "write" privileges on the database.
When the database is created, return to the database setup screen in the web browser and fill in the needed database details. Note that your web host user account ID may be needed as a prefix for the fields MySQL login and MySQL database.
Here is a guide for how it should look:
- MySQL login: yourhostID_databaseUserID
- MySQL password: databasePassword
- MySQL server: localhost (If "localhost" does not work, check with your host provider about what to use.)
- MySQL database: yourhostID_datbaseName
- Table prefix: prefix_ (e.g., txp_, txp2_, cats_, whatever_)
The Textpattern setup screen will indicate that you don't need to provide a table prefix if this will be your only installation of Textpattern. It is advised that you create a prefix anyway. You might not need a second installation of Textpattern right now, but you might want to have one at a later point in time, and providing a prefix for this installation enables you to do that later.
Make sure you use valid characters for MySQL for the prefix, only underscore (_), dollar ($), letters and numbers are allowed.
The site paths should already be filled in on your setup screen. You only need to verify that they are correct; but don't think too much about this, because if you added your Textpattern files as described previously, then these paths will be correct and you don't have to do anything.
Step 3: Creating your config.php file
If everything goes well up to this point, Textpattern will generate a snippet of code and ask you to copy/paste it into your configuration file on your server, replacing the contents of the file.
The file you'll actually be looking for is
textpattern/config-dist.php. Open the file and paste in the snippet of generated code (overwriting all file contents). Then save it. Then rename the file to just
Go back to your browser with the config setup screen, and click the "'I did it button for the configuration setup.
Step 4: Create the login account
The next screen is to create your Textpattern administration login account, which will also generate the necessary tables in the MySQL database.
(Note this is not the same as the ID and password used for your database, as discussed above.)
Step 5: Confirmation
Textpattern will let you know if all has gone well, and ask you delete the setup directory for security reasons. Do it now.
Use your FTP client and browse to
/textpattern/setup and delete the "setup folder (and all contents) from your server.
Return to the browser and click the "main interface" link at the top of the screen, which will take you to the administration login screen for your new Textpattern site.
Step 6: First Login Screen
You should now have reached the administration login screen for your Textpattern installation. Bookmark the location for easy reference; though you only need to remember the login is always at the textpattern folder default (i.e., domain.tld/textpattern).
To login to your admin interface, use the login information you created in Step 3 above. If you want to avoid logging in each time you visit, make sure the check box is selected (not advised if you share your computer with anyone).
Congratulations! You've successfully installed Textpattern.
The Admin-side awaits you, and you have some final security checks to take care of, which is the first task upon your first login. So take a couple of deep breaths and let's get started with Administration workflow.