Sorry for the long post with so many questions, but I am about to tackle a redesign of a client’s site in WP (as CMS) for the first time. What is the best way to approach this given that:
- I don’t want to mess with the old site and create downtime
- I’ll need to show client periodically what I’m doing
- I want the easiest and least “dangerous” way of migrating the site to LIVE status when it’s done
Here are some options I’ve considered, but I don’t know which is best. I am really terrified of the migration process when it’s ready to go live. I’ve had the fear of God put in me about broken links and failure, etc. at that delicate point in the process.
- Would it be better to design on my local server (MAMP)? But then how do I show it? And when I migrate to their domain how do I avoid the hazards of migrating it and
- Or to install WP in a subdirectory on their current site and then have to migrate it to the root (with all its hazards) when it’s done?
- If I design in a subdirectory on their site, and all the files are in proper relationship to each other, at the end, can I just delete all their old site files and move the contents of the WP directory to the root? Would that prevent the breaking of all the links?
- Or to set up a totally separate development domain on my hosting plan and later migrate to new domain (with all the hazards of moving it)?
Thanks in advance for any help.
RockyShark’s tips are good ones.
I would add that I usually dev locally, stage on a subdomain or folder of the client’s site and then migrate over to the live area when everyone is happy. I try to avoid going from local to live without a staging area. Stuff comes up from time to time
Some time ago I used to develop on local server but the problem is when you use some functions that varies according how the server is configured? For example, upload files or use GD library for resize an image.
If you don’t need to do this things, maybe a local server could be fine. It depends on your needs and how you feel comfortable. I prefer work directly on the server.
We do work on a local server, and migrate all the time. It’s not a big deal, really.
Whether you do it locally, or in a folder or subdomain on a remote server, a few simple steps:
- Disable all your plugins
- Use phpMyAdmin or similar to download the entire db as an sql file to your desktop
- Use your fave text editor and do a find/replace, replacing http://tempserveraaddress with http://www.newsite.com
- Upload the updated SQL file to the new server
- Update the config.php file to reflect the new server db details
- FTP the site to the new location
- Log in and turn the plugins back on
A good idea to have a bit of a poke around after you have done this and make sure everything is okay, and you may need to recreate the htaccess file if you’re using rewrite rules (come to think of it, we used to have to do that from time to time but it hasn’t been an issue for ages).
File permissions in wp-content/uploads is something else you may need to check - try uploading an image using the media bar when you edit a page.
That’s it. We do that all the time and the only dramas we had with this was the cforms plugin. We have since switched to gravityforms and have no other dramas.
And for the record, we develop locally on a Windows server and deploy to a LAMP environment.
I definitively don’t recommend to develop on your local server. Some configuration may vary and some things that work on local could not work in production server.
I usually develop new websites on the current server in a new subdirectory or subdomain. When the site is done I move the old site to a backup directory and the new site to root. It takes some time the check all the absolute URLs (sometimes I need to use it) and replace them with new root-based URLs.
For migration you should consider a little downtime to replace old files. See your server log to determine when the site has less connections (week days and time, i.e.: Mondays from 2AM to 5AM).
Thank you, Seba. That was my suspicion. It still makes me nervous to possibly break lots of links in the migration to the root.
So that makes me wonder why so many people recommend designing in the local server. If it’s so prone to problems, why do it at all?