Moving Servers? An ExpressionEngine Tip.

Mar. 2, 2009

2:42 pm

At Category 4, we’ve always used separate servers for development work and web hosting. Though the specifics of how that’s implemented are set to change in the near future, our basic model will remain the same. Development sites get a “dev” url while live sites get (naturally) a real, live url. If you’re like me and you’ve been following ExpressionEngine’s Knowledge Base article on porting an EE site from one server to another, let me share a secret.

You’ve been doing it the hard way.

I ran across the “Find and Replace” utility months ago when I was updating a client’s posts with some revised verbage, sitewide. This handy little tool does exactly what it says – that is, lets you search various resources in your EE database and replace specified bits within. You can find the Find and Replace utility by going to the Admin tab, choosing Utilities, and clicking Find and Replace.

What I’d missed initially is that you can actually select “Site Preferences” as a find-and-replace target for one or (if you’re using the multi-site manager) multiple sites. The reason this is important is that many site preferences aren’t easily accessible any other way than, as the Knowledge Base article linked above implies, clicking through tabs and tabs of control panel options. Where before I needed to find every instance of “http://devserver.com” and change it to “http://liveserver.com” through the admin interface, now I just use the included utility.

With Category 4’s WordPress sites, we’ll typically dump the database and do a search and replace on the dump to get at all the possible locations where the address may need to be changed. For some reason (I think because EE tends to serialize data when it really doesn’t need to) that approach never worked perfectly with EE.

But that’s fine. I like this new trick.

Comments

March 4, 2009

12:59 am

Oh, this is awesome. I never thought about using that. This will help greatly on sites that have many different “File Upload Preferences.”

Thanks!

Ian Pitts (#)

March 31, 2009

3:47 am

I’ve been using this method for quite a while now. I feel that it’s the fastes way. After all it automaticaly (well with little help) replaces everything you tell it to. It’s so simple I don’t know why it’s not a default method for everyone.

Odzyskiwanie Danych (#)

April 14, 2009

8:48 am

In fact it is surely going to save a lot of time, when you are moving on a new server.Thanks a lot for this method.

Markus (#)

April 16, 2009

1:53 am

How come I haven’t seen this post 2 weeks ago when I was doing exactly that. Only then I didn’t know any better so I spent countless hours doing everything manualy. It wasn’t fun.

web design miami (#)

May 27, 2009

1:13 pm

Maybe you can help!  I’ve been scouring the web, literally for days, hours at a time, trying to find help with pushing an EE site from {DEV} to {LIVE}.  I’m intrigued by the Find/Replace, but I’m at an even more rudimentary step in the process.

I’ve been going over and over using MyphpAdmin through my control panel provided by my hosting company.  It seems I’m not performing the right kind of “dump” to get a full backup.  Seems like so many options to choose from… Update, Insert, Replace, which one?  Data and Structure?  Just data?

I broke the site once by trying to restore an .sql backup of the dev site to the live site, and all hell broke loose.  Can someone, anyone, publish a start to finish, step-by-step on how to get a subdomain(dev) site pushed to a root(live) site on a regular basis?

Chad (#)

June 25, 2009

1:49 am

Find and Replace is pretty nice but I never trust automated tools like that - I always want to check everything myself afterwards. I’d rather just do it manualy.

Copart (#)

June 26, 2009

4:55 am

I find what helps a lot in moving servers is to store all the settings that are likely to change between servers in config.php. Any setting that can be stored in the database can be stored in config.php, and config.php gets the preference.

Avi Block (#)

June 26, 2009

8:44 am

Find and Replace is pretty nice but I never trust automated tools like that - I always want to check everything myself afterwards

Amenda (#)

August 11, 2009

1:39 am

If the website is static then all you have to do is FTP the files from your old site down to you local computer and then FTP it back to the new server.However is your web site is dynamic then you will have to get your developer involved.Typical dynamic web sites are e-commerce sites,sites that pull information off databases.......

india Search engine marketing company (#)

October 10, 2009

1:05 am

Thanks, I never heard of this method. This should save much more time than traditional approach.

strategie marketingowe (#)

February 8, 2010

4:31 am

I totally agree with your point here! I admire the stuff you post and the quality information you offer in your blog! Keep up the awesome work dude.

Portland Oregon SEO (#)

March 4, 2010

12:21 am

Hey Thanks for this! I found lots that are very useful to me such as Anika presents Reuse. It’s good to make some gifts for your friends during some festive season!
montreal escorts

Abbott (#)

March 30, 2010

3:41 am

I am searching webcam chat tips on google so i found your post so this is a very interesting find indeed. I will have to check it out when I get the time though. Thanks for the nice tips.
website design dubai

Mark Ewans (#)

April 30, 2010

12:25 pm

Really cool what you can acheive when you put your mind to it and take action.

Randall Flagg (#)

May 4, 2010

10:53 am

I am searching webcam chat tips on google so i found your post so this is a very interesting find indeed. I will have to check it out when I get the time though. Thanks for the nice tips.

Fuel saving devices (#)

Whaddya think?