Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPaula Azevedo
4,236 Points[site redesign] Duplicating a WP site?
Hi y'all.
I'm doing a redesign project for a website. My question is about the best way to work on a new version while the old site stays on the air.
What I'm thinking of doing:
- copy the entire site and install it in a second database;
- activate the temporary maintenance plugin;
- apply the new theme, content changes and everything else on this second site;
- once I've finished the new site, I redirect the domain to it and deactivate the old site;
Doubts:
- What, exactly, can happen with the permalinks of the old site?
- What happens to google indexing?
- is there another more appropriate way to apply changes parallel to the old site's existence?
Note: I don't want to work on localhost because my client needs to track development remotely.
1 Answer
Jacob Mishkin
23,118 PointsOne approach to this is by creating a "staging" site. By creating a subdomain, you can pull the site down into the subdomain, then you can work locally, and with using git, make daily commits then push them to the staging site for the client to review. Once the staging site is completed, you can then push your theme locally directly to the main site and BAM, bingo was his name O.
to address some of your doubts; using a subdomain and pulling in the original site this eliminates issues with permalinks, because its the same database, no issues with google indexing because its a subdomain.
Paula Azevedo
4,236 PointsPaula Azevedo
4,236 PointsTks Jacob.
I have no experience with git... can you point me a link of a documentation post related to what you're saying? (I'm heading to "Git Basics" course now)
About the "staging" site at the subdomain, would it be a entirely new site but with the same data as the "live" one? I mean, would I be able to change site theme, add plugins and apply modifications while still using the past posts, comments, meta, etc.? What do you mean by "push your theme locally directly to the main site"? I didn't get it ;/
I'd create a www.example.com/dev/ for staging site then later redirect the main domain to the new database? Sorry, not really sure how to proceed.
Jacob Mishkin
23,118 PointsJacob Mishkin
23,118 PointsNot a problem Paula. First I would suggest reviewing this course here on Treehouse modern WP workflow this will talk about staging servers and the such. for git there is a course here, but I will also say this site does help a lot. git
pushing: is when you take saved changes locally, TO somewhere
pulling: is when you take data, and FROM somewhere
About the staging site, lets say you have Paula.com on your hosting site you will create a subdomain. Then you need to install WordPress into the subdomain, then pull the live site into the subdomain that way you have the original database and themes. then you work locally, and push your data to the staging site so you can show your client.
Yes you will be able to retain all the info already on the live site except the plugins, you will have to download them to the local and staging sites.
There is no redirect, you simply push to the live site.
If you have further questions please feel free to ask.
PS a nice program to help with use git SourceTree