Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
I have followed the instructions on migrating from dev to production server at http://docs.couchcms.com/miscellaneous/ ... erver.html and that is very easy and works great. However, I am wondering if there is an easy way to update between dev and production servers after the initial migration has been done? So if the site has gone live but later there needs to be further content/templates, etc added and I need to do this on my dev server first, is there an easy way to push the updates to production when the dev work is done? I'm not comfortable with writing complicated SQL and such as that isn't really my area of expertise. Thanks in advance if you have any advice.
Valid question.
Unfortunately, one drawback of using MySQL as the backend is that there is no easy way of keeping the dev and production setups in sync. Any solution will necessarily involve taking the MySQL dump on the dev and applying it to production.
Can you advise or point me in the right direction as to how this is done?
Thanks.
This is really pretty easy using phpMyAdmin, standard issue on most server setups. Using phpMyAdmin on the server with the "fresh" data, export the site's database. You'll get a file named something.sql.

On the server you want to update, delete all of the tables. Don't delete the database, just delete all of the tables: "Drop" them in SQL parlance.
drop-tables.png
drop-tables.png (120.01 KiB) Viewed 68 times

Finally import the "fresh" sql file into the now empty database. That's it. Don't be scared. Test the process first with non-critical data to gain confidence, and you'll see that it's very simple.

You could also use this Couch Database Utility to help manage your databases, but using phpMyAdmin is pretty simple. @potato also created a database backup routine that you could use.

Note: Your local and production server have different urls. Some data may be stored with the full url - for instance, pictures and files in richtext editables. I do a search and replace on the sql file to make sure all urls are correct before importing it on the production server. You can easily be fooled by this issue. The production site looks fine on your own computer because it's referencing your own local files. But they're broken for everyone else.
This is great help, thank you so much!
5 posts Page 1 of 1

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 3 guests