11

A developer built our site locally configured as "craft.dev". At the same time, my sysadmin was busy getting Craft installed with Apache on our Linux server. He set that up with our real domain and purchased the $299 license for "ourcoolwebsite.com".

Now we've got the real website on the developer's machine, and a blank website on the linux server.

What files/folders do we need to migrate to get the real website up? Should we just dump and load his database and overwrite the one that was created for the install? I am guessing there are some database tables with data specific to my purchase and license key that differ from his. Basically I want to know how to take his work and put it into my production environment with database tables and file paths.

3 Answers 3

10
  1. Make sure both Craft installs are up-to-date.
  2. Craft's license is saved in craft/config/license.key, make a backup of your purchased license file.
  3. Move all your files/directories except:

    /craft/app/
    /craft/storage/

  4. Copy the backup of your license.key to craft/config/.
  5. Remove /craft/storage/, if it exists on your new server, to prevent cache errors.
  6. "dump and load" your database to the new server. Craft will update what's necessary.
  7. Update your config settings in /craft/config/.
  8. Go to your BackEnd.

Also you might find this interesting:

What's the best practice for handling data migration and organization across development environments?

2
  • Thanks Victor for the information here - this was exactly what I needed. Commented Jul 16, 2014 at 12:25
  • 2
    The only trouble I had with the explanation above was that user photos are stored in the craft/storage/userphotos directory. So, you'll lose these photos if you completely omit the storage directory. In my case, I only lost the photo for the admin and just updated it on the live site. In the case where there are more users with existing user photos this might be more of a concern. Maybe @Victor In or someone else can comment if uploading the craft/storage/userphotos directory from the development site would cause caching issues?
    – Justin K
    Commented Jul 6, 2016 at 11:10
3

Your purchase on the "real" domain was tied to your the craft/config/license.key file on that site.

All you should need to do is move your files up except for your local development license.key file, restore the database to the production site and adjust any domains/paths as necessary.

1
  • Also overwrite the local license.key with the one from the "real" domain, so you don't screw yourself later. Commented Jul 15, 2014 at 4:05
0

This article may be useful to anyone searching here as well: Database & Asset Syncing Between Environments in Craft CMS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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