7

I am new to magento and have been working a my first site and it is now ready to go live. I have been advised that once live to also build a staging or development site so that i can in the future work off that before putting any new changes to my live site.

Can i ask what are the best practices in setting this up? My web hosting has said they can offer to set it up within a sub directory of my existing domain but it will just be a copy of the files and database (so doubling my required disk space) and i would need to manually move and copy the files and database info. Is this the only way?

I did see one article but it required a virtual server to store the test site on which i don't have or have any knowledge in setting up

6

At least you should have a staging server with the sameconfiguration your live site have. This is to prevent server config issues.

Also, its not a good idea to have it in the same server since both sites will be using the same resources to run, which might slow down your live site.

A common environment setup might be 2 separate servers, one for PROD and one for staging/QA with the same setup, maybe provisioned with Ansible and/or Vagrant.

For deploys, you might want to use Jenkins to automate things, and as a hosting provider, i personally like Amazon. A medium to large instance with RDS and Elasticache is pretty fast in my experience.

I created this VM to develop Magento, you might also give it a try: https://github.com/miguelbalparda/vm

  • Thank you for the advice and link, very informative. I'll look to try and set up the same – odd_duck Jul 16 '14 at 14:14
  • VM is in an early stage. Im using it since in one of the companies i work with, it might have some things to improve. Feel free to fork it and PR any improvements. – mbalparda Jul 16 '14 at 14:18
1

We set up a completely different hosting account for our development server. We version our code using Beanstalk git and develop locally using a MAMP/WAMP stack.

In this way, we can create our changes, test them locally. Then, check in the files and promote with one click to development. We test again there and if all is okay, promote to production.

You have to manage configuration settings, of course, but in terms of making code file changes, this works very well for us.

The development server should have similar features as your production server, but it doesn't have to have as many resources (CPU cores, RAM) as your productions server. For instance, we have a basic account at MageMojo for our development server but a much larger account there for our production instances. We can build several installs on one development server even if we have multiple production accounts.

The key is the versioning. Versioning in Magento can be a bit tricky (local.xml file, in particular), but if you git ignore that file (and the media, var directories et al), it works quite well. This gives you roll-back capabilities, as well.

-1

Personally, I use xampp (wamp, or mamp) to have mysql and apache php server on my personal pc, and then I install magento with the sample data http://www.magentocommerce.com/download then you can design, develop, and break it. Once I am pleased I use an FTP client to push them to my live deployment of magento.

  • 1
    Did you just mention ftp? Darn, it still is not dead? Honestly, you want command control over you server during deploy, in case the upgrade botched your admin. Especially when you or your client cannot afford a full DTAP stack and tools capable of rolling back changes. – Melvyn Jul 15 '14 at 17:58

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.