Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2009-02-08 07:33:23
- stellularx
- Member
- Registered: 2005-05-06
- Posts: 13
Re: Moving installation to new host, importing database and MySQL error
Also, I just realized that upon installation, my home page (index.php) works but the sections from my past host does not work anymore.
For example:
http://nameofsite.com works.
But
http://nameofsite.com/section does not.
Offline
#17 2009-02-08 13:40:45
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Moving installation to new host, importing database and MySQL error
stellularx wrote:
Now, in the diagnostics area, it says: File directory path is not writable: /usr/local/tmp
Temporary directory path is not writable: /usr/local/tmp
You need to change the paths in Advanced preferences:
files: /path/to/site-root/files
temp: /path/to/site-root/textpattern/tmp
http://nameofsite.com/section does not
Is permanent link mode set to something other than messy? Then clean urls might not work. Try setting it to messy, namofsite.com/?s=section should work then. You can have a look at this thread to find a way to get clean urls to work.
Offline
Re: Moving installation to new host, importing database and MySQL error
OMG this web server installation process is insane! (Ok, I’ve gotten that off my chest.)
I’m hoping that someone can provide me with advice on how to transfer my new TXP site from Local Host to my web server.
My web server already has the MySQL module set up in it (that wasn’t hard) and I’m able to access the MyPHP Admin screen by going to: http://www.mywebsite.org/phpmyadmin/ (then logging in). Now that I see this page, I have no idea what to do with it. I did, however FTP the entire Textpattern folder to my root directory, now I’m trying to get the two to play nice.
It was recommended to me to backup my TXP database using the plug in: rss_admin_db_manager. However, I could not locate step-by-step instructions on how to 1. Backup my database, and tables (huh?). and 2. How to important them into my web server.
I have the book “Textpattern Solutions” but they are only helpful on Local Host installation.
I’m sure that there’s an easy way of moving my TXP site from my computer to my web server, right?
Thanks so much for your time.
The TXP Installation resource: http://textbook.textpattern.net/wiki/index.php?title=Detailed_Installation_Instructions could not help me yet since it assumes that i can login to the TXP “set up” via my server.
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Moving installation to new host, importing database and MySQL error
laptophobo wrote:
My web server already has the MySQL module set up in it (that wasn’t hard) and I’m able to access the MyPHP Admin screen by going to: http://www.mywebsite.org/phpmyadmin/ (then logging in). Now that I see this page, I have no idea what to do with it. I did, however FTP the entire Textpattern folder to my root directory, now I’m trying to get the two to play nice.
If you haven’t already done so, you need to create a new database on the live server. You should be able to do this through your web hosting account control panel. You might also be able to do so directly in phpMyAdmin; will depend on your hosting account configuration.
It was recommended to me to backup my TXP database using the plug in: rss_admin_db_manager. However, I could not locate step-by-step instructions on how to 1. Backup my database, and tables (huh?). and 2. How to important them into my web server.
What are you using to manage databases on your local server? Use that to do a full MySQL dump. Then you can import that file into your new live database using phpMyAdmin.
Note that there are some crucial differences between local and live versions. Namely the config file (/textpattern/config.php) and some site preferences. Once you have created your new database, edit config.php on the live site with the correct db settings, and also the correct file paths. When you have the site transferred you’ll need to run diagnostics and correct those prefs involving file paths.
Code is topiary
Offline
Re: Moving installation to new host, importing database and MySQL error
laptophobo wrote:
1. Backup my database, and tables (huh?)
Do MySQL dump from your localhost (in phpMyAdmin Export). Or give MySQL command:
mysqldump --opt --user=MyUsername --password=MyPassword database > ToWhereWhatFileHuh
2. How to important them into my web server.
Helpful link Textbook / Moving Installation from one Host to Another in addition what Jeff said.
Basically it just involves uploading one file and changing some rows in /textpattern/config.php.
Offline
Re: Moving installation to new host, importing database and MySQL error
I’m trying to follow the TXP installation instructions (http://textpattern.net/wiki/index.php?title=Moving_Installation_from_one_Host_to_Another) but there appears to be gaps in the info. For one thing, it says that in the installation of the new data base that I’m to create a “First User” name. There was no such options. And, it assumes that I’m hosting on DreamHost, which I’m not. So, I moved on.
Steps taken:
1. Went to my Local Host’s My PHPMyadmin and made a backup of my site (it made a file called localhost.sql).
2. Went to my web server account (www.mywebsite.org/phpmyadmin/) and created a “New Database”. This took me to a new screen where it states “No tables found in database”. Below is the option: “Create new table on database (name of my database)” with two fields: “Name” and “Number of Fields”. I suppose it wants me to use the same name for “Name” that I’m calling my database, but what “Number of Fields” should I put in?
Once this is resolved, will the instructions afterward actually work? Is there a better way? What should I do?
Thanks much.
Last edited by laptophobo (2010-03-14 05:43:29)
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Moving installation to new host, importing database and MySQL error
laptophobo wrote:
Went to my web server account (www.mywebsite.org/phpmyadmin/) and created a “New Database”. This took me to a new screen where it states “No tables found in database”. Below is the option: “Create new table on database (name of my database)” with two fields: “Name” and “Number of Fields”. I suppose it wants me to use the same name for “Name” that I’m calling my database, but what “Number of Fields” should I put in?
No, you don’t create the tables manually, you just upload the dump.
Offline
Re: Moving installation to new host, importing database and MySQL error
I don’t see that as an option. Here’s what I’ve done:
• There’s a list of “data bases” within the Databases drop-down window (cdcol, informaiton_schema, mysql, phpmyadmin, test, textpattern). I chose only “textpattern”
• A new page open with a list of txp tables. I Clicked All (link is at bottom of page). But I do not see a “dump” button or anything like that.
• I then selected the “Export” tab on top.
• I selected the settings per Textpattern’s installation guide.
• Save file.
I’m a newbie at this.
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Moving installation to new host, importing database and MySQL error
Nevermind. All is now working. (I’ll post details for others soon.)
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Moving installation to new host, importing database and MySQL error
After accumulating the advice from many forum contributors, I’ve been able to move my TXP from Local Host to my web server. Below are step-by-step instructions that may be of use to others. (Note, settings may reflect my particular folder names.)
First thing is to read and have ready this page by Textpattern: http://textpattern.net/wiki/index.php?title=Moving_Installation_from_one_Host_to_Another
FIRST STEP: Copy your TXP database and tables in Local Host. Go to: http://localhost/phpmyadmin/
• Create a database name (if not done so already).
• Open data base page (top left tab)
• There’s a list of “data bases”. Choose your data base (e.g. textpattern) Ignore everything else there.
• A page will open with a list of txp tables. Click All (link is at bottom of page)
• Select “Export” tab on top.
• Choose the settings per the Textpattern page above.
• Save file onto your computer (like desktop).
SECOND STEP: Import your TXP database into your web server: (Make sure that PHPMyAdmin is installed (your web host provider will show you how)
Log into your server version of PHPMyAdmin
(e.g.: http://www.mywebsite.com/phpmyadmin/) (Login should be the same as the web hosting account login).
• Select the database you created in the left sidebar if it’s not selected by default.
• Click the Import tab.
• Browse for the text file backup of your database on your hard drive (desktop?)
• Upload it!
Once imported you should see a message “Import has been successfully finished, (number) queries executed.”
THIRD STEP: Upload your entire Textpattern tree to the Server
Upload your entire Textpattern tree (localhost/textpattern) and the default.php & .htaccess files to your new server via FTP — e.g.: var/www/html (your web host provider will supply you with the correct path)
FOURTH STEP: Configuring Textpattern to interface with the new database:
• Open textpattern/config.php
• Update all of the values that have changes with your server move: (Contact your host service provider to confirm these settings!)
<?php
$txpcfg[‘db’] = ‘(Name of Database)’;
$txpcfg[‘user’] = ‘XXXXX’; [Note: same as hosting account.]
$txpcfg[‘pass’] = ‘XXXX’; [Note: same as hosting account.]
$txpcfg[‘host’] = ‘localhost’;
$txpcfg[‘table_prefix’] = ‘’;
$txpcfg[‘txpath’] = ‘/var/www/html/sample.dev/’; [Note: “sample.dev” is the folder where my textpattern database resides. Yours may not.]
$txpcfg[‘doc_root’] = ‘/var/www/html/’;
$txpcfg[‘dbcharset’] = ‘utf8’
?>
View website at: http://mywebsite.com/example.dev/
Access Textpattern Control Panel at: http://mywebsite.com/example.dev/textpattern/
FINAL STEPS:
• GO TO the Admin > Preferences and change the “Site URL” from: localhost/example.dev to: www.mywebsite.com/example.dev
• GO TO Admin > Preferences > Advance and change the File Directory path: from: C:\xampp\htdocs\example.dev\files to: the settings used on your config.php form (e.g.: /var/www/html/example.dev/files)
• GO TO Admin > Preferences > Advance and change the Temporary Directory path from: C:\xampp\htdocs\example.dev\textpattern\tmp to: the settings used on your config.php form (e.g.: /var/www/html/example.dev/textpattern/tmp)
• Go to the Textpattern folder on the web server and CHMND (left click over file) and make sure that all the boxes are checked.
Then do a Diagnostics check (in Admin) to make sure you get the “All checks passed!” message.
Lastly, read JSOO’s reply (below)
Last edited by laptophobo (2010-03-15 04:10:15)
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Moving installation to new host, importing database and MySQL error
Well done!
A few other preference settings to look at:
Basic Preferences
- Adjust the Time Zone setting if your live server is in a different time zone.
- Change Production Status to Live (once you have looked over the site to confirm that you aren’t getting any errors or notices).
- Set Logging appropriately.
Advanced Preferences
- In Admin, edit the file and temporary directory paths. (And the plugin cache directory if you are using that, although I don’t recommend it for live use.)
Now that you know how to do it, make regular full backups of the live site database. This, along with regular full backups of the live site files, will allow you to quickly restore (or recreate on a different server) the site if something goes wrong.
You can also use partial MySQL dumps to transfer changes from local to live (or vice versa). You do this in the same way as with the full dump you uploaded. (You must check the “Add drop tables” option when configuring the dump.) In general you will not want to transfer the txp_prefs or txp_log tables. For example, if you make a bunch of design changes on the local site, involving new images and articles, and edited forms and pages, you can simply upload those tables instead of copying and pasting changes one at a time.
Code is topiary
Offline
Re: Moving installation to new host, importing database and MySQL error
jsoo, Thanks for your added advice.
You recommend to set “logging” appropriately. What do you mean by that (and how?)
One thing I have noticed since moving the website is that the Admin Users function does not work properly. (I have posted this question in another thread.) Basically, I’m able to list a new user but it does not add the user (have tried logging in with the new user name and am rejected). Also, when selecting “email me the password” it does not go out. Do you think I need to change configurations for outgoing mail or something?
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Moving installation to new host, importing database and MySQL error
laptophobo wrote:
You recommend to set “logging” appropriately. What do you mean by that (and how?)
It’s one of the areas where you are likely to want different behavior on live and local sites. There’s no point logging on your local copy.
Do you think I need to change configurations for outgoing mail or something?
I don’t know. Do your diagnostics check out?
Code is topiary
Offline
Re: Moving installation to new host, importing database and MySQL error
Just did a diagnostics review and got these 2 error messages:
File directory path is not writable: C:\meinverzeichnis\xampp\xampp\htdocs\example.dev\files
Temporary directory path is not writable: C:\meinverzeichnis\xampp\xampp\htdocs\example.dev\textpattern\tmp
I checked Admin> Preferences> Advance, and found that my settings were still pointing to Local Host. So, since my Site URL is: www.mywebsite.com/example.dev I changed the file directory path to:
www.mywebsite.com/example.dev/files AND I changed the Temporary directory path to:
www.mywebsite.com/example.dev/textpattern/tmp
My error message then read:
File directory path is not writable: www.dotorgwebworks.org/example.dev/files
Temporary directory path is not writable: www.dotorgwebworks.org/example.dev/textpattern/tmp
I then changed it to the values I had set on my config.php form:
/var/www/html/example.dev/files (for File Directory) and /var/www/html/example.dev/textpattern/tmp (for Temporary Directory).
I went to the Textpattern folder on my web server and checked on all of the boxes (CHMD).
Went back to Diagnostics and got “All checks passed!” message.
HOWEVER, my Add User function still does not work right. I’m getting emails sent out now (with password), but I’m neither able to add a User or delete a listed user.
Perhaps another setting needs to be done?
What might I be doing wrong?
Thanks much…
Last edited by laptophobo (2010-03-15 04:04:15)
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: Moving installation to new host, importing database and MySQL error
You have granted your MySQL user insert rights? And if you use security modules you have set the admin panel to exclusing list?
Also, if you are adding users you need Publisher rights and you can only be logged in once and only from one browser for one user. If you crosslogin, your cookie changes and your login becomes invalid.
Offline