Magento Forum

   
Development Environment
 
egorilla
Jr. Member
 
Total Posts:  5
Joined:  2008-08-07
 

Hello,

We’re beginning to develop our first Magento-powered website. Typically, we develop our sites internally and then migrate the code base and content to the production server. Given the nature of setting up Magento and our desire to fully customize the customer experience, what is the best practice in developing Magento sites? Best to install and customize/modify the site on the end production server? Or is there a clear path to developing on a development server and then migrating the application to the production server?

Thanks in advance for any tips or guidance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tr88
Jr. Member
 
Total Posts:  3
Joined:  2009-09-12
 

I second that.

Anybody ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
marenkay
Member
 
Avatar
Total Posts:  39
Joined:  2009-09-24
Germany
 

It depends on your development environment and the type of production system.

Personally I am using Mac and/or Linux for development, and Linux for production systems.

Here is how I do it:

- Run a local installation of every shop whose files are stored in a version control system. I store both the web server folder with magento, etc. and the SQL database there in order to track all changes made during development. Usually I have a local domain without .com, etc.

- Install Magento using the Downloader into the local development system, and install the Blank theme to customize this for each customer… but: copy the blank theme, do not edit it directly. Having the blank theme installed helps tracking updates required for themes.

- Transfer all files using ssh and rsync to the target host. This way its faster and easier than FTP, etc. I usually have a shell script, which I hand a client name, and it will transfer all web files, plus the sql data changed.

What else?

I usually disable the Magento downloader on managed client installations, since the past has shown that clients often play with it and wonder why their shop all of a sudden dies.

Moving a local installation to a production system is pretty easy. One file edit, and one database update to set the config flag for the base_url to the correct value.

Rough breakdown, but I hope you get the idea.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Question
Jr. Member
 
Total Posts:  4
Joined:  2009-09-28
 

I am using Magento 1.3.2.4 to develop a small eCommerce site. I plan to develop in test directories on the Web server and promote the final, stable test environment to production. I have discovered that, when the directory on which Magento was originally installed is deleted, the Admin Page is no longer accessible in directories that were created by copying the original install directory. I am wondering what other problems are in store and how to do this properly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
marenkay
Member
 
Avatar
Total Posts:  39
Joined:  2009-09-24
Germany
 

Actually your problem is caused by the way, Magento stores its’ own URL. If you check your Magento installation, you will see that inside of “app/etc/local.xml” only the database configuration, caching, and various other things are stored, but not your installations URL. This is why moving the files around and using the same database will at first fail.

If you check the database table “core_config_data” you will see that your installations actual URL is stored here, either in the path “web/unsecure/base_url” or “web/secure/base_url”, depending on your usage of SSL.

Thus if you change the directory, the admin dashboard can not open, as its’ URL does not exist anymore. You will need to update the “core_config_data” table with the production URL.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Question
Jr. Member
 
Total Posts:  4
Joined:  2009-09-28
 

Marekay,

Many thanks for your expert reply. I had hoped to put your advice to good use, but installing a Blank Theme seems to have ruined my environment. I’ll post the details of the Blank Theme problem elsewhere.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top