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
-
Something happened within the last 2 weeks on our WordPress-hosted site that created "duplicates" by counting www.company.com/example and company.com/example (without the 'www.') as separate pages. Any idea what could have happened, and how to fix it?
Our website is running through WordPress. We've been running Moz for over a month now. Only recently, within the past 2 weeks, have we been alerted to over 100 duplicate pages. It appears something happened that created a duplicate of every single page on our site; "www.company.com/example" and "company.com/example." Again, according to our MOZ, this is a recent issue. I'm almost certain that prior to a couple of weeks ago, there existed both forms of the URL that directed to the same page without be counting as a duplicate. Thanks for you help!
Intermediate & Advanced SEO | | wzimmer0 -
SEO question regarding rails app on www.site.com hosted on Heroku and www.site.com/blog at another host
Hi, I have a rails app hosted on Heroku (www.site.com) and would much prefer to set up a Wordpress blog using a different host pointing to www.site.com/blog, as opposed to using a gem within the actual app. Whats are peoples thoughts regarding there being any ranking implications for implementing the set up as noted in this post on Stackoverflow: "What I would do is serve your Wordpress blog along side your Rails app (so you've got a PHP and a Rails server running), and just have your /blog route point to a controller that redirects to your Wordpress app. Add something like this to your routes.rb: _`get '/blog', to:'blog#redirect'`_ and then have a redirect method in your BlogController that simply does this: _`classBlogController<applicationcontrollerdef redirect="" redirect_to="" "url_of_wordpress_blog"endend<="" code=""></applicationcontrollerdef>`_ _Now you can point at yourdomain.com/blog and it will take you to the Wordpress site._
Intermediate & Advanced SEO | | Anward0 -
How to make sure dev site is not index in wordpress and how would it be affected?
hi guys! I'm currently having a dev version of my site (dev.website.com) that once everything is done i would move the dev to the public domain (website.com). But since is a total duplicate content of my real site would it affect the seo? if so, i tried setting the reading privacy in wordpress so google would not index it but im afraid when i live it in the future and revert the setting back to normal it would affect the site seo. any opinion and suggestion on this?
Intermediate & Advanced SEO | | andrewwatson920 -
Duplicate
Is it harmful to have two of these which are identical in the section?
Intermediate & Advanced SEO | | Sika220 -
Merging 11 community sites into 1 regional site
I am merging 11 real estate community sites into 1 regional site and don't really know what type of redirect should I use for the homepage?, for instance: www.homepage.com redirect to www.regionalsite.com/community-page Should I 301 this redirect? If yes, how could I 301 redirect a homepage to an internal page in my new site? Cheers 🙂
Intermediate & Advanced SEO | | mbulox0 -
PDF on financial site that duplicates ~50% of site content
I have a financial advisor client who has a downloadable PDF on his site that contains about 9 pages of good info. Problem is much of the content can also be found on individual pages of his site. Is it best to noindex/follow the pdf? It would be great to let the few pages of original content be crawlable, but I'm concerned about the duplicate content aspect. Thanks --
Intermediate & Advanced SEO | | 540SEO0 -
Best way to transfer pagerank from one site to another
We currently own two sites (with unique domains) that accomplish a similar goal, but are completely different (so there's no duplicate content, etc) and were developed independently. Both sites have very good pagerank due to great press and inbound links over several years. Also both have thousands of pages and get a lot of inbound deep links. We plan on shutting one of the sites down so we can focus on the other. We'd like to transfer as much traffic and SEO/pagerank value from the one we're shutting down to the one we're continuing to focus on. What's the best way to do that? Should we just do a 301 redirect? Or keep the site running in some diminished form and link it to the site we're focusing on? I saw SEOmoz has a good guide on moving sites http://www.seomoz.org/learn-seo/redirection which recommends a 301 redirect, but I wanted to see if the same applies when merging sites as we are in this case.
Intermediate & Advanced SEO | | 212areacode0 -
Redirect micro-niche site to bigger niche site?
I have a micro niche site that performs reasonably well (page 1 at least) for it's main keywords. It is an exact match domain. To save the ongoing maintenance of a site that gets less than 10 visitors a day, I was thinking of redirecting this micro niche site to a bigger site (a niche site that the micro niche fits into, if that makes sense!) Would I lose rankings because of the power that the EMD provided? Would it be better keeping it there for the backlink it provides to the bigger site (although on the same C Class IP)
Intermediate & Advanced SEO | | BigMiniMan0