Development Cycle, Development and Production

What are the best practices for maintaining separate development and production environments, then merging the changes?

I'm hosting my own XAMPP (Apache on Windows) server, so space and file management is flexible. I own several domain names, of which at least one can be used for development.

I have been doing all development on prod. Sad but true.

Here are some examples so you can see the scope of my question.

- Run two different physical or virtual servers.
- Run two different instances of XAMPP on one server.
- Run two sites in one instance of XAMPP.

- Run dev in corner of production:
- Run dev as a subdomain:
- Run dev as it's own domain:

I think all of these would work with differing costs and benefits.

My goal is ease and simplicity.

After the architecture and naming are chosen, please provide instructions on how to merge/migrate/copy/promote. Here's a hint--the architecture and naming choice that has the fewest steps will probably win.

And, to define the scope of this part of the question, here are my concerns. Which of the following do I need to muck with?

Router - IP forwarding (like in the case of different domains on different servers)
Apache - edit conf files
MySQL - copy/move/rename databases
Concrete5 - change base path, domain name, site name, association with MySQL database

BTW, I've seen variations on this question, but not asked at a high level. It might be worth putting article in the help documentation.

Thank you.

View Replies:
admin replied on at Permalink Reply
Hmmm, I must have made this post too confusing. Let me retry.

How do you maintain a production site, do development, and move development into production?

Thanks you.
Ekko replied on at Permalink Reply
I'm not sure how everyone else does it, but I can share my method of creating, and implementing a development, completing it, and than taking it live.

In your server tree you will put the production install off one level. So under you public html folder is the unpacked c5 install with blocks, concrete, config, controller, etc. In here you will want to place a folder called development or Zdevelopment if you want to make it easier to find at the bottom of file tree. In this folder you will want to unpack concrete5 the same way as it is in first level resulting in the development url

So in the development folder you have a completely secondary version of c5 with its own database. There will also be your other copy of c5 with its own database and file structure. Now you can just close off permissions to your development site, and remove from sitemap.xml so it isn't indexed while you build, and your original version will stay live, and functioning.

When your ready to launch it you just use your file manager in your cpanel not on C5, to move up a level which will be an option in your cpanels file manager. When you do this you select all the folders included in the development folder and the development folder itself taking it up a level so its next to public html. Once they are on the same level rename public html to old site, and rename your development folder to public_html.

Voila your new development is at

Its actually only a few clicks, and one folder creation so its pretty easy. To install concrete 5 initially I use the same method with unpacking a zipped version next to public html, and then relabelling the c5 folder public html. The above is also useful if you are installing to a shared server with garbage permissions, and have to unzip underneath public html. In that case you just bump it up with the file manager in cpanel. Makes every install a breeze.

This eliminates the need to move any files, folders, databases, or anything at all, and when your all said, and done you just delete the old site.
admin replied on at Permalink Reply
Thanks! This looks like the kind of quick-n-easy method I was hoping for. It looks like this will meet my needs to develop and put into production changes within one domain. That's my primary need. So I'll give this a shot when I get time.

I have a couple related lower priority questions. Does it make sense to develop on one domain name, and put into production on another domain name?

I currently have one server, one implementation of WAMP (XAMPP), one implementation of C5 and several domains maintained as separated directories under the html structure. I think this is what JohntheFish was recommending in the linked thread. Thanks for that. Nice to have confirmation that I'm doing something right.

And finally, I'm wishing for a simple magic answer to this question that seems to have been answered many times: How can I migrate from one complete environment (including a full install of a WAMP (XAMPP), Concrete5, HTML directory structure) to another--in my case, on the same server. I'm not a big fan of fiddling, meaning upgrading XAMPP, upgrading Concrete5, upgrading code all on the fly. I prefer creating a fresh environment of WAMP, C5, HTML, developing it, proving it, then making it production (which I would want to be as simple as a one line redirect), but there are lots of settings across different levels that need to be tweaked.

It's okay to tell me this is a bad idea or that there is no simple magic answer to that one. ;-)
jordanlev replied on at Permalink Reply
I just ZIP up the whole shebang, upload it to the server, unzip it there, then import the database.

You should absolutely not be doing development on your server -- I'm not really sure why you'd need to do that since you already say you're using WAMP/MAMP/XAMP.

You might also want to look into setting up version control (SVN or GIT etc.)... I use this on my local machine and also on my staging server where I show sites to clients before they're deployed. This allows me to really easily send all updates from my local machine to the staging server (although sometimes this requires doing a database dump from one to the other as well).

For live deployment, I just copy everything to the live site. Changes after that need to be manually copied up, but these are generally rare for my situation -- only minor tweaks to some styles are usually required after a site goes live (may be different for your kind of business and clients though).

admin replied on at Permalink Reply
I'm not familiar with a cpanel. It looks like this is a utility to move files around on the remote hosting server. Any configuration automation built into such a tool? What I really need to know, since I'm serving this off of a local Windows server with XAMPP, if I can just move the directory structure--simple move with Windows File Explorer, etc. No other changes needed like database locations, or ini files, etc.?

It sounds like you described exactly what I was asking for. Now I just need to work through the details. If I understand correctly, it should be easy. I'll give it a shot.
jordanlev replied on at Permalink Reply
Yes, sounds like you have a fairly straightforward setup. I'd just do what you're already doing and run some tests with fake sites (or copies of real sites) and work out the kinks in your process.

C5 sites are relatively easy to move -- just move the entire site directory (including the /files directory), tweak the config/site.php settings as needed (probably only database connection, or if you're running an older version of C5 also the BASE_URL and DIR_REL settings), and maybe the .htaccess file. Other than that you should be good to go.

Best of luck.
JohntheFish replied on at Permalink Reply
Coming from a different direction, my recommendations on organising directory structures and domains.
adamjohnson replied on at Permalink Reply
Koeg, you should read this article about developing Concrete5 on a Windows based OS:

It'll save you some headache down the road.