Migrating your CMS from one server to another one

From time to time, you may need to push your CMS from your staging env to your production env.

This can be tedious if you have multiple custom pages done using Magento's CMS

Luckily, there is a two-steps solution that can fit the bill

For simplicity sake, we've used some generic username, password, hostname and database schema.  Simply adjust everything accordingly to your setups


Export process
1) log in to your origin server using SSH

2) execute the following:
mysqldump -uusername -ppassword -hhostname database cms_page cms_page_store cms_block cms_block_store | grep INSERT | sed 's/INSERT INTO/REPLACE INTO/g' > ~/cms-export.sql

3) transfer the dump to the destination server
scp ~/cms-export.sql username@destination-server:~/


Import process
1) log in to your destination server

2) execute the following:
mysql -uusername -ppassword -hhostname database < ~/cms-export.sql

3) Refresh the cache

4) QA!


Feel free to request our help if you want us to execute this task for you.
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

Numeric value out of range: 1690 BIGINT UNSIGNED

Description Recently when making some cleanup on a Magento based store that was having over 550K...

Reindexing

In some situation when you want to re-index Magento catalog you will get an error message or...

Reset Files and Directories permissions

From time to times, we must fix permissions on files and directory in order to secure an...

How to add and edit attributes in Magento

Each product that you add and edit has a set of attributes that you can configure such as name,...

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '2828-148-1-471' for key 'PRIMARY'

While trying to reindex your store using the command line, you stumble on the following...