Re: [SC-WP-Meetup] Replacing existing site w/new Wordpress site

From: Chris B.
Sent on: Wednesday, November 18, 2009 12:14 PM
I made a PDF recently of the transfer process. I have started to find it less cumbersome, and more routine. I am not sure if the PDF will make things seem more complicated--it is rather detailed.

The bottom line is, if you can use SQL queries to cleanly replace all instances of the old (development or staging) URL, with the live URL, then just about everything else goes smoothly.

Here is the basic SQL syntax:

UPDATE wp_options SET option_value = replace(option_value, 'http://local-domain.local', 'http://remote-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://local-domain.local','http://remote-domain.com');

UPDATE wp_posts SET post_content = replace(post_content, 'http://local-domain.local', 'http://remote-domain.com');


UPDATE wp_options SET option_value = '/path/to/document/root/remote-domain.com/wp-content/uploads' WHERE option_name = 'upload_path';


UPDATE wp_options SET option_value = replace(option_value, 'local-domain.local','remote-domain.com') WHERE option_name = 'dashboard_widget_options';

UPDATE wp_options SET option_value = replace(option_value, 'local-domain.local','remote-domain.com') WHERE option_name = 'widget_text';



(Remember to change table prefix)


If you do this, and then you update the database settings at the top of wp-config.php, you may have nothing else to do.


Now, there is something obvious here: This is a very automatable process, and someone / we / I should create an automation for this.


The biggest deal is that you have to be very careful when messing around directly in the database, backing stuff up all over the place. Actually, if I automated this, it would make it a lot less error-prone.






On Tue, Nov 17, 2009 at 9:36 PM, Jason Wehmhoener <[address removed]> wrote:
Yes.


On Tue, Nov 17, 2009 at 9:31 PM, Ethan <[address removed]> wrote:
Thanks for the feedback.? Sounds like it is a cumbersome process.? I'll look into the Mamp Pro option.? If I decide not to go that route, can I create the new site on a new host, using a placeholder domain, then transfer everything over and make the necessary changes to the database?

Thanks for the help,
Ethan


On Mon, Nov 16, 2009 at 12:53 PM, Jason Wehmhoener <[address removed]> wrote:
Yeah, and if your ISP allows you to open port 80 on your router. Mine doesn't.?

-J


On Mon, Nov 16, 2009 at 12:52 PM, shane <[address removed]> wrote:
One other option (though I haven't used it, is a feature offered in mamp pro. They supposedly allow you to share your local host over the web, though my security dar goes off. It could be a cool option if you are sysadmin savvy.

-S

Shane Pearlman
[masked]

On Nov 16, 2009, at 12:34 PM, Jason Wehmhoener wrote:

You will want to create the new site somewhere on the web if you need to get feedback from the client before launch. You can either use your own webhost, or potentially the client's if their host is flexible enough. I use Dreamhost and they allow you to create unlimited subdomains, which is nice for dev/staging purposes.?

When you are done with development, moving a wordpress site to a new URL involves several steps. This is one thing that I wish were a little simpler. Wordpress unfortunately stores the URL many times in the database. My approach has been to do an SQL dump of the DB, search/replace the URL and import the modified db on the new host. There are a few other steps involved, and some alternative approaches. Try a search for "moving wordpress to new url" and also practice with a fake/dummy wp install on a couple subdomains of your own before attempting to push a client site live.?

-j

On Mon, Nov 16, 2009 at 12:29 PM, Ethan <[address removed]> wrote:
Hi,

I'm an absentee member of your wordpress meetup group.? I'd love to come to the meetings but haven't been able to yet because of work.

I'm hoping someone from this group can point me in the right direction.? I've built a couple wordpress sites from scratch, however, now I need to create a new site that will replace an existing site.?

What is the best way to go about developing a new site while leaving the existing site up during the process?? Do I need to create the new site locally, then upload it to the server once it is completed?? If so, what are the steps involved in replacing an existing site with my locally developed site?? Also, if I create the new site locally how will I be able to get feedback from the client during the development process??

I'm sure this info exists somewhere online but I haven't been able to find it yet.? Thanks in advance,

Ethan




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Ethan ([address removed]) from The Santa Cruz WordPress Meetup.
To learn more about Ethan, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jason Wehmhoener ([address removed]) from The Santa Cruz WordPress Meetup.
To learn more about Jason Wehmhoener, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by shane ([address removed]) from The Santa Cruz WordPress Meetup.
To learn more about shane, visit his/her member profile

To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jason Wehmhoener ([address removed]) from The Santa Cruz WordPress Meetup.
To learn more about Jason Wehmhoener, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Ethan ([address removed]) from The Santa Cruz WordPress Meetup.
To learn more about Ethan, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jason Wehmhoener ([address removed]) from The Santa Cruz WordPress Meetup.
To learn more about Jason Wehmhoener, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]

This email message originally included an attachment.

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy