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
-
Our new site will be using static site generator which is supposed to be better for SEO?
Hi folks, Our dev team is planning on building our new marketing webpages on SSG or Static Site Generator(we are stepping away from SSR). Based on my research this is something that can help our SEO in particular for site speed (our site has a poor score).
Intermediate & Advanced SEO | | TyEl
Are there any challenges or concerns I should be aware regarding this direction? If so what are they and how can this be addressed? Thanks0 -
Whats the Best way to Protect Wordpress Website from Getting Hacked.
Hi All, I just like to know whats the best way to protect wordpress website for getting hacked. I tried using Wordfence but nothing much happened. I m in shared Host and when ever there is a sign of attack my hosting company takes the site off which affects my site ranking a lot. I m trying to keep all my plugins updated but still it happens . Like to know what other people do . I am open for Paid tool suggestion as well. Thanks
Intermediate & Advanced SEO | | Verve-Innovation0 -
How much SEO damage would it do having a subdomain site rather directory site?
Hi all! With a coleague we were arguing about what is better: Having a subdomain or a directory.
Intermediate & Advanced SEO | | Gaston Riera
Let me explain some more, this is about the cases: Having a multi-language site: Where en.domain.com or es.domain.com rather than domain.com/en/ or domain.com/es/ Having a Mobile and desktop version: m.domain.com or domain.com rather than domain.com/m or just domain.com. Having multiple location websites, you might figure. The dicussion started with me saying: Its better to have a directory site.
And my coleague said: Its better to have a subdomain site. Some of the reasons that he said is that big companies (such as wordpress) are doing that. And that's better for the business.
My reasons are fully based on this post from Rand Fishkin: Subdomains vs. Subfolders, Rel Canonical vs. 301, and How to Structure Links for SEO - Whiteboard Friday So, what does the community have to say about this?
Who should win this argue? GR.0 -
Hacked Wordpress Site! So many 404s
So I had a site that I worked on get hacked. We eliminated the URLs, found the vulnerability (Bluehost!) and rolled back the site. BUT they got into the Google Search Console and indexed a LOT of pages. These pages are now 404 errors and I asked the robots.txt file to make them noindex. The problem is that Google is placing a "this site may be hacked" on the search listing. I asked Google to reevaluate it and it was approved by there are still 80,000 404 errors being shown and it still believes that the uploaded files that we deleted should be showing. Doing a site search STILL shows the infected pages though and it has been a month. Any insight would definitely be helpful. Thanks!
Intermediate & Advanced SEO | | mattdinbrooklyn0 -
Best Way to Incorporate FAQs into Every Page - Duplicate Content?
Hi Mozzers, We want to incorporate a 'Dictionary' of terms onto quite a few pages on our site, similar to an FAQ system. The 'Dictionary' has 285 terms in it, with about 1 sentence of content for each one (approximately 5,000 words total). The content is unique to our site and not keyword stuffed, but I am unsure what Google will think about us having all this shared content on these pages. I have a few ideas about how we can build this, but my higher-ups really want the entire dictionary on every page. Thoughts? Image of what we're thinking here - http://screencast.com/t/GkhOktwC4I Thanks!
Intermediate & Advanced SEO | | Travis-W0 -
Best way to move from mixed case url to all lowercase?
We are currently in the process of moving our site from a mixed case structure i.e -> <sitename>/franchise/childrens-child-care/party/Bricks-4-Kidz/company-information.cfm</sitename> to all lowercase i.e -> <sitename>/franchise/childrens-child-care/party/bricks-4-kidz/company-information.cfm.</sitename> In order to maintain as much link juice as possible, should we be using 301 redirects to point from the old to the new? or would it be more advantageous to wait for the next crawl and the link juice would also be somewhat maintained even though the all the upper case letters have been converted to lowercase?
Intermediate & Advanced SEO | | franchisesolutions0 -
What is the best way to run a blog?
Hi, I was wondering what is the best way to run a blog? The options I thought of are: Completely separate domain with many links to my main site. blog.domain.com www.domain.com/blog Thanks
Intermediate & Advanced SEO | | BeytzNet1 -
Best way to get the keyword ranking at the top
I am working on site for around six months now.
Intermediate & Advanced SEO | | ray2810
I have done social bookmarking submission, directory submission, blog comments, forum submissions etc. Is there anything else i can do to make the rank go higher. nothing is working correctly.0