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
-
Site Structure - Is it ok to Keep current flat architecture of existing site pages and use silo structure on two new categories only?
Hi there, I have a site structure flat like this it ranks quite well for its niche site.com/red-apples.html site.com/blue-apples.html The site is branching out into a new but related lines of business is it ok to keep existing site architecture as above while using a silo structure just for the two new different but related business? site.com/meat/red-meat.html site.com/fish/oceant-trout.html Thanks for any advice!
Intermediate & Advanced SEO | | servetea0 -
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 -
Google cache is showing my UK homepage site instead of the US homepage and ranking the UK site in US
Hi There, When I check the cache of the US website (www.us.allsaints.com) Google returns the UK website. This is also reflected in the US Google Search Results when the UK site ranks for our brand name instead of the US site. The homepage has hreflang tags only on the homepage and the domains have been pointed correctly to the right territories via Google Webmaster Console.This has happened before in 26th July 2015 and was wondering if any had any idea why this is happening or if any one has experienced the same issueFDGjldR
Intermediate & Advanced SEO | | adzhass0 -
Best Way To Go About Fixing "HTML Improvements"
So I have a site and I was creating dynamic pages for a while, what happened was some of them accidentally had lots of similar meta tags and titles. I then changed up my site but left those duplicate tags for a while, not knowing what had happened. Recently I began my SEO campaign once again and noticed that these errors were there. So i did the following. Removed the pages. Removed directories that had these dynamic pages with the remove tool in google webmasters. Blocked google from scanning those pages with the robots.txt. I have verified that the robots.txt works, the pages are longer in google search...however it still shows up in in the html improvements section after a week. (It has updated a few times). So I decided to remove the robots.txt file and now add 301 redirects. Does anyone have any experience with this and am I going about this the right away? Any additional info is greatly appreciated thanks.
Intermediate & Advanced SEO | | tarafaraz0 -
Best way to implement canonical tags on an ecommerce site with many filter options?
What would be the best way to add canonical tags to an ecommerce site with many filter options, for example, http://teacherexpress.scholastic.com? Should I include a canonical tag for all filter options under a category even though the pages don't have the same content? Thanks for reading!
Intermediate & Advanced SEO | | DA20130 -
What are the best ways to fix 404 errors?
I recently changed the url of my main blog and now have about 100 404 errors. I did a redirect from the old url to the new one however still have errors. 1. Should I do a 301 redirect from each old blog post url to the new blog post url? 2. Should I just delete the old blog post (url) and rewrite the blog post? I"m not concerned about links to the old posts as a lot of them do not have many links.
Intermediate & Advanced SEO | | webestate0 -
New site now links disappearing in Open Site Explorer and GWT
We launched a new site at the beginning of December 2012 and carefully 301'd all URLs from the old site to the new (custom CMS on old site wordpress on new). Our rankings have slipped quite badly but the most worrying thing is that we used to have about 1200 backlinks according to GWT/OSE before the new site launched and now we're down to about 30. Can anyone help shed some light on this please? The site is www.littleoneslondon.co.uk A few things that might help: 1. We were getting a lot of links through our job feeds (it's a nanny recruitment site) on indeed and trovitt, for some reason no new ones from these have appeared in site explorer and all the old jobs are gone completely. 2. We had 1000s of not found errors in google webmaster tools and once these were redirected and marked as fixed this is when the links disappeared. 3. We are getting quite a few 504 errors on the site due to an old proxy redirect (/blog was hosted on a different server on the old site and has not been removed yet), this will be fixed tomorrow but could this be a factor? 4. The developer seems to have redirected all the links through wordpress directly some how (I don't see any redirect plugins but there are lots of pages called 'redirect'). There are no references in the htaccess file for any redirects other than from the /blog folder that the wordpress instance sits in. Sorry for the long post, I hope I've given any details you'd need and I really appreciate any help anyone can give. Thanks, Karl
Intermediate & Advanced SEO | | Bdig0