Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Updating KMP in your test environment (MySQL)

Author: Edward Hardin Reference Number: AA-00769 Views: 5526 Last Updated: 05/05/2016 10:37 AM 0 Rating/ Voters

Please Read Carefully

This guide applies to a setup with two instances of KMP, e.g. Production and Testing (you may have a development or backup instance instead of testing instance, for example). Please follow these steps if you would like to update the Testing instance with the most recent data from the Production instance. 

Warning! Please note that by following these steps all data in your Testing instance will be lost and overwritten with the data from the Production instance.

If you do not have a testing environment yet, please follow the Installation of KnowledgeBase Manager Pro guide.

  1. Make a backup of the data on PRODUCTION and copy the backup file to TESTING. You can use your favorite database management tool for this or make a backup from the command line (it works on Windows as well as on Unix-like systems). 
    mysqldump -u db-login-on-production -p --default-character-set=utf8 kmp-database-on-production > dump.sql
  2. Truncate the database on TESTING (i.e. delete all tables from it).
  3. Restore the database backup on TESTING. Again, you can do this from the command line or with your favorite database management tool.
  4. mysql -u db-login-on-testing -p --default-character-set=utf8 kmp-database-on-testing < dump.sql
  5. Delete all files within the following folders on TESTING (paths are relative to the root KMP folder).
    /admin/attaches/

    /admin/media_storage/
  6. Copy the contents of the following folders from PRODUCTION to TESTING.
    /admin/attaches/

    /admin/media_storage/
  7. Update the links to embedded images by running a MySQL query on TESTING:
    UPDATE `faq_articles` SET `answer` = replace(`answer`, 'http://www.production.com/admin/media_store/2/', 'http://www.testing.com/admin/media_store/2/') WHERE `account_id`=2;

    where:
    www.production.com is the domain name of the PRODUCTION instance 
    www.testing.com is the domain name of the TESTING instance
    if KMP resides in a sub-directory relatively to the web root directory, adjust the query accordingly
    if your database tables have a prefix, add it to the table name 'faq_articles' in the query, e.g. 'prefixfaq_articles'

If you have any questions, feel free to contact us.

Custom Fields
This article applies to the following versions of Knowledgebase Manager Pro:6.2.2
Database type:MySQL