0

The problem: When I develop a wordpress website the client first wants to see it before to upload it to his server/domain.

Until now I work on my local PC but I have a lot of orders and the clients wants to see the websites before the migration on their server, but they can't because I work on my local PC.

So my question is what is the best way to create a WordPress staging environment online?

My idea is to buy separate domain / hosting and install all websites in separate folders on this server.

My other idea is to make some king of a software on the server to manage the development process.

Also, if the client want to see the website I use my server and after that I delete the website but for large amount of project this is not a solution.

How you manage large amount of project and what systems do you use.?

  • You can try ngrok to create a tunnel to your local machine ngrok.com/faq#wordpress – czerspalace Nov 14 '16 at 18:36
  • Can I tunnel only a specific folder with ngrok? – Yordan Kostadinov Nov 15 '16 at 15:53
  • What kind of setup do you have on your local pc? MAMP, WAMP,...? – czerspalace Nov 15 '16 at 18:01
  • I'm using xampp. – Yordan Kostadinov Nov 15 '16 at 18:04
  • If this folder is setup as a virtual host, then yes you can. Is this site a subfolder of the main localhost or is it it's own domain? – czerspalace Nov 15 '16 at 18:26
0

I'll offer a couple alternatives to @jgraup but his suggestions are all good ones. I also must note that I use macOS so some of the particulars of these suggestions won't work on a PC but there should be equivalents.

If my client(s) already have a site up using maindomain.com, I will usually set up a staging site at dev.maindomain.com through their web host.

Like you I work locally and I push development updates to the staging site so the client can view and give feedback. For this I use WP Migrate DB Pro which is invaluable to upload the database and the SFTP plugin for Sublime Text 3.

If your code editor has built-in FTP/SFTP then all you need is WP Migrate DB Pro for the database and media files which you run either through the WP Admin or via WP-CLI using the command line. Regardless of where your staging site resides, WP Migrate DB Pro will work.

Alternatively, I just started using DreamCompute with DreamHost via my business VPS account to host our staging server(s). I am not a Linux expert by any means but you can get a web server set up with some creative Googling and copy and pasting without too much trouble. Your web host may have a similar scalable server option with OpenStack or something similar. We've found DreamCompute to be super fast and perfect for collaborative projects.

Another option is MAMP/MAMP Pro (an alternative to Vagrant) which can make your local site available over the internet. On Mac, CodeKit can do this as well.

Lastly, if you have your own site like myportfolio.com, you can always install staging client WordPress installs in subfolders so something like: myportfolio.com/superclient/. And that folder has it's own WP install.

  • Thank you for the advice @joshuaiz. I checked the Sublime plugin SFTP and I think that it's great. I will install the plugin for sure. For now I'm thinking to hire VPS server and host the websites there. Until now I used my website to store the clients website like you said myportfolio.com/superclient/ but this solution is not very good. One more idea is to make my localhost available on internet and when a client want to see his/her website I just sending him the Ip address. – Yordan Kostadinov Nov 13 '16 at 16:14
  • @YordanKostadinov one thing to note is that to use the SFTP plugin with Sublime Text, it only will upload changed files which means you need to have a GitHub repository for every project which is good practice anyway. – joshuaiz Nov 13 '16 at 17:10
0

You really can't get away without having a publicly accessible staging environment these days for remote clients. Or at least trying to use something like Vagrant to keep the environments as close together as possible. You can also have the client checkout the Vagrant environment with git then just pass your database to them when it's time to update.

Hosting companies like Pantheon include several environments like; staging, test, and live. While Cloud9 is a cloud based editor which means you could edit your code and share the results with a remote user in real-time.

WP-CLI does a really good job of giving you the ability to export / import and migrate databases.

And rsync will always be a great way to sync folders between servers.

http://welaika.github.io/wordmove/ looks interesting too. Found via http://vccw.cc/

  • I will check the pantheon website for sure. I would love to use WP-CLI but I use windows for development. This leads to the questions. Can I use WP-CLI under windows? – Yordan Kostadinov Nov 13 '16 at 15:56
  • @YordanKostadinov - yes. wp-cli.org/docs/installing – jgraup Nov 13 '16 at 17:06
  • Have you seen wordmove? – jgraup Nov 14 '16 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.