Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2010-03-14 11:55:25

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

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

#26 2010-03-14 12:23:18

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#27 2010-03-15 01:50:32

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

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

#28 2010-03-15 02:13:32

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

#29 2010-03-15 03:28:46

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

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

#30 2010-03-15 04:45:17

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#31 2010-03-15 06:04:46

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: Moving installation to new host, importing database and MySQL error

Hi Gocom. Thank’s for replying quickly.

Your first question regarding MySQL user rights, where would I find such a setting? (It’s not in Admin Preferences). Same thing with regards to “security modules”. I don’t think I’ve made any changes to what the default settings were when I installed TXP.

Regarding your last recommendation about not switching browsers, I use firefox and have publisher rights. But I’m still unable to delete users.

Hoping you’ll be able to figure this out with me. Thanks for your time.

Last edited by laptophobo (2010-03-15 06:10:47)


Living the Location-Independent Life: www.NuNomad.com

Offline

#32 2010-03-15 07:58:50

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Moving installation to new host, importing database and MySQL error

laptophobo wrote:

Your first question regarding MySQL user rights, where would I find such a setting? (It’s not in Admin Preferences). Same thing with regards to “security modules”. I don’t think I’ve made any changes to what the default settings were when I installed TXP.

TXP won’t change or decide those, but server do. TXP is just PHP script that runs within the rules you and the server gave it to.

  • Do the users get added to the DB? Are they listed on the backend? If not, make sure that you don’t read the page from cache.
  • Do you use the main account to delete the users?
  • Can you modify, create and delete forms/articles?

Offline

#33 2010-03-15 08:28:29

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: Moving installation to new host, importing database and MySQL error

I add users via the Admin Users panel.
I was logged in as Publisher when I tried to delete the user (so, yes).
I have no problems with creating or modifying anything else. I can even post comments (while I’m logged in.)


Living the Location-Independent Life: www.NuNomad.com

Offline

#34 2010-03-15 12:11:34

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Moving installation to new host, importing database and MySQL error

laptophobo wrote:

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.

As you’ve discovered, a file path is not a URL. You may not need such loose permissions (i.e., checking all the boxes); depends on your sever config.


Code is topiary

Offline

#35 2010-03-16 02:20:09

laptophobo
Member
Registered: 2010-03-01
Posts: 216
Website

Re: Moving installation to new host, importing database and MySQL error

Well, the “Textpattern Solutions” book stated I should use the 777 setting. My web service recommended 755. So, I tried 755 and that didn’t change a thing. (Diagnostics says all passed.) Still, I’m unable to login as a different user and when I create a new user account, my own password changes to that of the new account. I did learn, however, that if I delete a user and assign their assets (per the pop up option) to an existing user account, it deletes from the list.

So here’s the thing. All appears to be working except for the User management.

thanks for trying.


Living the Location-Independent Life: www.NuNomad.com

Offline

#36 2010-03-16 02:37:04

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Moving installation to new host, importing database and MySQL error

Have you tried logging out, trashing the cookies for this site (both live and local), and logging in again? I don’t know if it’ll do anything, but it’s what I’d try.

Do you mean that simply creating a new user account causes your password to change? That is really strange.


Code is topiary

Offline

Board footer

Powered by FluxBB