Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » Running WordPress » Web Hosting for WordPress »

Moving WP blog to new domain--not sure what to do with database??


  #1  
Old Oct 31, 2009, 07:26 AM
kmagyarics
 
25 posts · Oct 2009
Hi--

I'm trying to migrate my blog from trywine.net/wordpress to kellymagyarics.com. I tried these instructions:

http://codex.wordpress.org/Moving_Wo...o_a_New_Server

Moving WordPress
Languages: English • 日本語 • Русский • 中文(简体) • (Add your language)

Contents
[hide]
1 Moving WordPress Within Your Site
2 Giving WordPress its Own Directory While Leaving the WordPress Index File in the Root Directory
3 Moving WordPress to a New Server
4 Moving WordPress to a New Server with Fantastico
5 Additional Information

There are times when you need to move WordPress around within your server, and times when you need to move WordPress from one server to another. You don't need to reinstall. WordPress is flexible enough to handle all of these situations.

Easy answer for most installations:

If database and URL remains the same, you can move by just copying your files and database.
If database name or user changes, edit wp-config.php to have the correct values.
If you want to test before you switch, you must temporarily change "siteurl" and "home" in the database table "wp_options" (through phpMyAdmin or similar).
If you had any kind of rewrites (permalinks) setup you must disable .htaccess and reconfigure permalinks when it goes live.



Moving WordPress Within Your Site
Moving the WordPress files from one location on your server to another - changing its URL - requires some special care.

Here are the step-by-step instructions:

Create the new location using one of these two options:
If you will be moving your WordPress core files to a new directory, create the new directory.
If you want to move WordPress to your root directory, make sure all index.php, .htaccess, and other files that might be copied over are backed up and/or moved, and that the root directory is ready for the new WordPress files.
Login to your blog.
Go to the Administration > Settings > General panel.
In the box for WordPress address (URI): change the address to the new location of your main WordPress core files.
In the box for Blog address (URI): change the address to the new location, which should match the WordPress address (URI).
Click Save Settings.
(Do not try to open/view your blog now!)
WordPress 2.0 only: Delete the folder wp-content/cache.
Move your WordPress core files to the new location. This includes the files found within the original directory, such as http://example.com/wordpress, and all the sub-directories, to the new location.
If you are using Permalinks, go to the Administration > Settings > Permalinks panel and update your Permalink structure to your .htaccess file, which should be in the same directory as the main index.php file.
If you have problems with missing images that you've uploaded, you need to change the path to the images on every post directly on your SQL database. For this, follow the instructions on Tamba2's Tutorial "Moving your weblog inside your PC".
You must also check and edit 'store uploads folder' under Settings-Miscellaneous or all your new uploads will continue to go into the old folder.
Existing image/media links uploaded media will refer to the old folder and must be updated with the new location.
It is important that you set the URI locations BEFORE you move the files.

Suppose you accidentally moved the files before you changed the URIs: you have two options.

OPTION 1. Suppose the files were originally in /path/to/old/ and you moved them to /path/to/new before changing the URIs. The way to fix this would be to make /path/to/old/ a symlink (for Windows users, "symlink" is equivalent to "shortcut") to /path/to/new/, i.e.

ln -s /path/to/new /path/to/oldand then follow the steps above as normal. Afterwards delete the symlink if you want.

OPTION 2. If you forget to change the WordPress Address and Blog Address, you will be unable to change it using the wordpress interface. However, you can fix it if you have access to the database. Go to the database of your blog and find the wp_options table. This table stores all the options that you can set in the interface. The WordPress Address and Blog Address are stored as siteurl and home (the option_name field). All you have to do is change the option_value field to the correct URL for the records with option_name=’siteurl‘ or option_name=’home‘.

You're done. Test your site to make sure that it works right. If the change involves a new address for your blog, make sure you let people know the new address, and consider adding some redirection instructions in your .htaccess file to guide visitors to the new location.

Changing The Site URL also provides the details of this process!

Giving WordPress its Own Directory While Leaving the WordPress Index File in the Root Directory
Please see this article, Giving WordPress Its Own Directory, for detailed instructions.

Moving WordPress to a New Server
If you are moving WordPress from one server to another, begin by backing up your data. This includes backing up your WordPress database as well as all the core files, images, plugins, and other files on your site. See WordPress Backups and Backing Up Your Database for more details.

Note: If you are changing to a new server but same domain, all you need to do is edit wp-config.php and upload everything as it is to your new server.
If You Don't Care If Your Old Blog Works

1. Download a copy of the main wordpress files from your OLD blog to your hard drive and edit wp-config.php to suit the new server.

2. Go back to your OLD blog and go to options and change the url (both of them) to that of your new site.

3.Again, download your database (but keep the old one just in case), upload this new database and the copy of the wordpress core files with the edited wp-config.php to your new server. Thats it!

I did the first two steps, and when I changed the url I was kicked of the admin site for my old blog. I don't really understand what I'm supposed to do with my new/old databases, and what else I need to configure.

I uploaded all the WP files with an FTP client, and now I'm getting this message on my home page:

Parse error: syntax error, unexpected T_STRING in /home/content/k/m/a/kmagyarics/html/wp-config.php on line 2

Can someone please give me some direction about my SQL DB? Do I need to rename the old one and restore it? How? And what else do I need to configure?

Thanks--I'm not well versed in SQL and this is driving me nuts...it's taken me awhile to get this far, and I feel like I'm so close...hopefully.
  #2  
Old Oct 31, 2009, 09:11 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Moving from one server to another is not hard, but it is not easy either. You need to be familiar with an FTP program, MySQL and Wordpress. If you don't know what you are doing, you should probably hire someone to guide you.

1) BACKUP YOUR DATABASE BEFORE YOU START - go do it now! If you don't know how, you need to hire someone to train you (I do this, if you are interested, send me a PM and I'll send you my rate)

2) make a backup of your wp-config folder

3) on the new server, create a database

4) on the new server install WP and update teh wp-config.php to the new database name and userid

5) edit the SQL export created in step 1 (a copy of course, not the original)
change all 'www.olddomain.com' to 'www.newdomain.com'

6) on the new server, import the edited SQL file into the new database - DO NOT use phpMyAdmin for this as it will take forever, use the 'mysql' import syntax

7) that should be it. if you missed something, just delete all teh tables from teh database on the new server, fix the SQL and re-import it
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 31, 2009, 11:31 AM
kmagyarics
 
25 posts · Oct 2009
Thanks--I backed it up before I started yesterday using a plugin from Wordpress. Was that sufficient? It created 1 SQL backup file that's on my desktop.

When I do #6, what do I need to call the file? Do I overwrite what's there?
  #4  
Old Oct 31, 2009, 12:35 PM
kmagyarics
 
25 posts · Oct 2009
ok, I just used MySQL to create a backup of my database from my old domain, downloaded it, and am trying to edit it.

My old blog address was trywine.net/wordpress, and the new one is at the root of kellymagyarics.com. So I need to remove all references to the wordpress directory when I edit, too, right?

Do I also need to edit the DB name and hosting info at the top of the SQL dump, too, to reflect the new DB?

And after this is all done, do I just use the import feature on MySQL to import it?

Thanks so much for your help!
  #5  
Old Oct 31, 2009, 01:10 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
when you create the database, there are no tables in it. If you run the wordpress install step, it will create empty tablesw, but you don't want them. You want the tables and data from the old database and they are in the export, so they will be created when you do the import.

any line beginning with a '-' or anythhing enclosed with a '/*...*/' is a comment and you can ignore it
you will want to make sure to comment any 'Create database...' command
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Mar 2, 2011 at 11:11 AM.
  #6  
Old Mar 2, 2011, 11:07 AM
SLIweb
 
6 posts · Feb 2011
Philadelphia MSA
Send a message via ICQ to SLIweb Send a message via Skype™ to SLIweb
Not sure I understand this properly. We have been building our Wordpress site under strategiclearning.com/wordpress

Once the site is far enough along, we want to "move" it to strategiclearning.com We are not changing servers, but all the WP folders and files are inside the Wordpress folder on the server. Its only been about a month since I installed and Ive already forgotten if I created that folder in the Root, or if that was done by default by WordPress. I think I created the "Wordpress" directory, so . . .
  1. Can I simply move everything that is in the Wordpress folder up one level to the Root level to change the URL from strategiclearning.com/wordpress to strategiclearning.com? (I am guessing not)
  2. Do the directions above apply only when migrating to a new server? OR
  3. Do the directions above apply when only the URL is changing? OR
  4. Do the directions above apply when migrating to a new server or changing the URL?
  5. If they are relevant to changing the URL, how would I go about doing the equivalent of a global "Search and Replace" on an exported copy of the database in a way that would allow it to be imported after the "reinstall of WP?"
  6. Last, if I use Filezilla to download a copy of the entire domain (Root and all) and Wordpress Database Backup (Version 2.2.3 | By Austin Matzkoto) get an up-to-date copy of the Database, do I have a complete back-up copy?
Thanks.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving header Karin Atahualpa 3 Wordpress theme 3 Oct 26, 2009 09:37 AM
How to display "Recent Posts" from 'Blog / wordpress' domain on home different domain Geoff Plugins & Atahualpa 1 Aug 27, 2009 08:07 PM
reinstall Atahualpa with Options with access to old database grasshopper Installing & running WordPress 1 Aug 8, 2009 05:52 AM
[SOLVED] How to save the theme options for moving my blog on an other server ? Manu-PierreB Atahualpa 3 Wordpress theme 1 Jun 20, 2009 07:05 AM
Front/Home Page (only) not working after domain change prophet224 Atahualpa 3 Wordpress theme 1 May 12, 2009 02:17 PM


All times are GMT -6. The time now is 06:17 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.