Best way to duplicate a wordpress site for staging purposes?
-
I want to make some changes to my Wordpress site, and want to somehow set up a live staging area. Does anyone know of a good way to do this?
I want all of the same content there I just want to be able to make changes to it and try it all out before going live. Any thoughts on this?
Also I want to be sure the staging site doesn't get indexed since it will be a complete duplicate of my existing site.
Thanks!
-
Howdy,
I've recently become a fan of WPengine for this reason - they've got some neat staging features, including, I believe, being able to stage changes, check them out, and push them live. But, that would probably require you to change hosting.
That said, here's how I tend to move sites from development to production (or production to development). Someone who knows more might have some changes or suggestions, or an easier way, but this is what works for me:
-
Install WordPress somewhere. Make sure its noindexed and/or password protect the directory.
-
Download a copy of your wp-content folder from your existing site (this will pull all of your themes, plugins, etc.)
-
Export a copy of your wordpress database (how to here: http://codex.wordpress.org/Backing_Up_Your_Database)
-
Open up your database in a text editor (I like Notepad++) and locate the first instance of your old domain name with the new one and then use find and replace to switch out all instances of the old domain name for the new one e.g. if it's noahsdad.com/ and you're moving to dev.noahsdad.com/ use find and replace to switch all occurances of noahsdad.com/ to dev.noahsdad.com/. Be careful to look at trailing slashes etc.
-
Upload your wp-content file to the new wordpress install. Overwrite the old one.
-
Open the database for the fresh WP install using PHPmyadmin (or the equivalent, on your server). Import the database that you conducted the search/replace on.
The advantage of uploading the wp-content folders and then then database is that the Database changes while the files for plugins etc. are already in place. Therefore, it should retain many of the plugin settings so you won't get any serious weirdness due to an important plugin not working.
Here's a guide that I like http://wpmu.org/migrating-wordpress-to-a-new-server/. It doesn't conform exactly to the method I use (they upload the database first), and it has some extra stuff in it like updating your nameservers which you should ignore, but it covers the database part pretty nicely.
Hope this helps.
Bede
-
-
Thanks so much. I actually don't need any other staff people to see it. I just want some designers in other parts of the U.S. to see it.
The main this is how to duplicate it. Including all of the images, database, etc.
I've never done anything like this before.
Thanks.
-
OK, then use the subdomain, you can then set up with dreamweaver a check in/out system for your staff which stops people editing the same files etc. On save/put you can set it to upload it to your testing server (subdomain). you would then be able to view this from any machine in your office (i would also still block all IPs on that subdomain except for your office). Once happy you can then either upload the specific files then to the main server, or do a release every evening/other evening after testing etc.
-
I'm actually on a mac.
If I install it locally on my mac I can't let other people see it unless they are looking at my computer, correct?
I have other domains...would be better to use one of those, or to use a subdomain?
Thanks.
-
If you're on Windows, you can locally install xampp on your machine, and then install wordpress locally.
Or you can do what columK suggests and install it on a subdomain on your site. Here is info from wordpress about moving domains - you can also install a plugin to do this - I've used Wordpress Move in the past
Once you've set up the new site, go to the settings section, reading, and then click the checkbox to discourage search engines from reading the testing site - that will modify the robots.txt to block search engines.
Good luck!
Mark
-
That's what I need help trying to create. I also want the staging site to be a duplicate of the existing site, but there so much content I can't do a simple import / export through Wodpress's admin panel...
-
Why not create a subdomain that only your office IP can view? You can then test as much as you like without worrying about other people viewing it or Google.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
What's the best way to use redirects on a massive site consolidation
We are migrating 13 websites into a single new domain and with that we have certain pages that will be terminated or moved to a new folder path so we need custom 301 redirects built for these. However, we have a huge database of pages that will NOT be changing folder paths and it's way too many to write custom 301's for. One idea was to use domain forwarding or a wild card redirect so that all the pages would be redirected to their same folder path on the new URL. The problem this creates though is that we would then need to build the custom 301s for content that is moving to a new folder path, hence creating 2 redirects on these pages (one for the domain forwarding, and then a second for the custom 301 pointing to a new folder). Any ideas on a better solution to this?
Intermediate & Advanced SEO | | MJTrevens0 -
New site. How important is traffic for a new site? And what about domain age?
Hi guys. I've been building a new site because i've seen a real SEO opportunity out there. I'm a mixing professional by trade and so I wanted to take advantage of SEO to help gain more work. Here's the site: www.signalchainstudios.co.uk I'm curious about domain age. This site fairly well optimised for my keywords, and my site got pretty good content on it (i think so anyway). But it's no where to be seen on the SERP's (link at all). Is this just a domain age issue? I'd have though it might be in the top 50 because my site's services are not hard to rank for at all! Also what about traffic? Does Google want to see an 'active' site before it considers 'promoting' it up the ranks? Or are back links and good content the main factor in the equation? Thanks in advance. I love this community to bits 🙂 Isaac.
Intermediate & Advanced SEO | | isaac6631 -
What's the best way to deal with deleted .php files showing as 404s in WMT?
Disclaimer: I am not a developer During a recent site migration I have seen a bit of an increase in WMT of 404 errors on pages ending .php. Click on the link in WMT and it just shows as File Not Found - no 404 page. There are about 20 in total showing in webmaster tools and I want to advise the IT department what to do. What is the best way to deal with this for on-page best practice? Thanks
Intermediate & Advanced SEO | | Blaze-Communication0 -
Spammy sites that link to a site
Hello, What is the best and quickest way to identify spammy sites that link to a website, and then remove them ( google disavow?) Thank you dear Moz, community - I appreciate your help 🙂 Sincerely, Vijay
Intermediate & Advanced SEO | | vijayvasu0 -
Joomla to Wordpress site migration - thousands of 404s
I recently migrated a site from Joomla to Wordpress. In advance I exported the HTML pages from Joomla using Screaming Frog and did 301 redirects on all those pages. However Webmaster Tools is now telling me (a week after putting the redirects in place) that there are >7k 404s. Many of them aren't HTML pages, just index.php files but I didn't think I would have to export these in my Screaming Frog crawl. We have since done a blanket 301 redirect for anything with index.php in it but Webmaster Tools is still picking them up as 404s. So my question is, what should I have done with Screaming Frog re exporting to ensure I captured all pages to redirect and what should I now do to fix the 404s that Webmaster Tools is picking up?
Intermediate & Advanced SEO | | Bua0 -
How do you 301 redirect URLs with a hashbang (#!) format? We just lost a ton of pagerank because we thought javascript redirect was the only way! But other sites have been able to do this – examples and details inside
Hi Moz, Here's more info on our problem, and thanks for reading! We’re trying to Create 301 redirects for 44 pages on site.com. We’re having trouble 301 redirecting these pages, possibly because they are AJAX and have hashbangs in the URLs. These are locations pages. The old locations URLs are in the following format: www.site.com/locations/#!new-york and the new URLs that we want to redirect to are in this format: www.site.com/locations/new-york We have not been able to create these redirects using Yoast WordPress SEO plugin v.1.5.3.2. The CMS is WordPress version 3.9.1 The reason we want to 301 redirect these pages is because we have created new pages to replace them, and we want to pass pagerank from the old pages to the new. A 301 redirect is the ideal way to pass pagerank. Examples of pages that are able to 301 redirect hashbang URLs include http://www.sherrilltree.com/Saddles#!Saddles and https://twitter.com/#!RobOusbey.
Intermediate & Advanced SEO | | DA20130 -
Wordpress Duplicate Content Due To Allocating Two Post Categories
It looks like google has done a pretty deep crawl of my site and is now showing around 40 duplicate content issues for posts that I have tagged in two seperate categories for example: http://www.musicliveuk.com/latest-news/live-music-boosts-australian-economy http://www.musicliveuk.com/live-music/live-music-boosts-australian-economy I use the all in one SEO pack and have checked the no index for categories, archive, and tag archive boxes so google shouldn't even crawl this content should it? . I guess the obvious answer is to only put each post in one category but I shouldn't have to should I? Some posts are relevant in more than once category.
Intermediate & Advanced SEO | | SamCUK0 -
How get rid of duplicate content, titles, etc on php cartweaver site?
my website http://www.bartramgallery.com was created using php and cartweaver 2.0 about five years ago by a web developer. I was really happy with the results of the design was inspired to get into web development and have been studying ever since. My biggest problem at this time is that I am not knowledgable with php and the cartweaver product but am learning as I read more. The issue is that seomoz tools are reporting tons of duplicate content and duplicate title pages etc. This is likely from the dynamic urls and same pages with secondary results etc. I just made a new sitemap with auditmypc I think it was called in an attempt to get rid of all the duplicate page titles but is that going to solve anything or do I need to find another way to configure the site? There are many pages with the same content competing for page rank and it is a bit frustrating to say the least. If anyone has any advice it would be greatly appreciated even pointing me in the right direction. Thank you, Jesse
Intermediate & Advanced SEO | | WSOT0