How Can I Move KBPublisher to Another Server?

Moving KBPublisher to a new server is a relatively simple process, provided you copy all files and retain the same file structure.

To do so you need to:

If you wish, you can rename your database and/or move your folders around, but the instructions below do not cover that.

Before you start

The database

The database contains your articles, your users and your settings and while you can reinstall pretty much everything else (except uploaded files) by re-installing KBPublisher, no-one can fix a database that isn't there.
  1. Backup the database and restore it on new server.
    Full instructions on backing up and restoring a database can be found here
    Check the new server to ensure the database is there before going any further.

KBPublisher files

Backup the directories and copy them across to the new server. Keep the same directory structure.

The directories you need to copy are:

  1. The main KBPublisher directory. This is directly under the public-html folder, and will be usually be named kb or kbp, depending on how KBPublisher was installed initially
  2. The kb_files directory. This contains all the files you uploaded using the Files module.
    To find the exact name/location of this directory: click on the Settings menu, choose the Admin tab and check the Files directory field
  3. The kb_upload directory. This is the folder that contains all your images and any other uploaded files via HTML editor.
    To find the exact name/location of this directory: click on the Settings menu, choose the Admin tab and check the HTML editor file directory field

Local files

Local files are files which were already on the server and which you then linked to the knowledgebase. To add local files you would have added them by either clicking on the Files menu and choosing Add Local File (these files were already on the server and you effectively just linked them to the knowledgebase), or by setting directory rules by clicking on the Files menu, then assigning directories in the Directory Rules tab.

If you haven't done either of these things then you don't have any local files to copy and can ignore this part.

UPDATE kbp_file_entry SET directory = replace(directory, '/home/old/file', '/home/new/file');
  1. Copy any local files across to the new server.
    Unfortunately, we can't tell you where these files will be, as they will be unique to your site.
    Retain the same file structure if you can, as it will be easier.
  2. If you move keep the same directory paths and names on the new server everything should work. (You can test this when you log on to the knowledgebase by trying to open one of these local files.) If, however, the paths have changed, then you need to write one-line find-and-replace statements in SQL to replace old path to new one.

    For example, if the old path is /home/old/file and the new one is /home/new/file then your search and replace will be something like:

Install any third-party tools

  1. Install third party tools such as xpdf and catdoc on the new server if required.

Update the config file

Now that everything is on the server you need to update the configuration file to point to the new server.

  1. Update admin/ to match the new server values.
    You need to change anything that points to a path on your server, which may include:

Update settings

You should now be able to log on to KBPublisher.

  1. Log on to your knowledgebase as an admin user
  2. If you are using Export Plugin, Click on the Settings menu, choose the Plugins tab, and set the HTMLDOC installation path to point to the new location where it is installed
  3. Click on the Settings menu, choose the Admin tab, and
  1. Click on the Settings menu, choose the Admin tab, and update the HTML Editor file directory to point the the new upload directory
  2. Click on the Settings menu, choose the Email tab and set correct values if required
  3. If you use a custom template, click on the Settings menu, choose the Public Area -> Common tab and change the template page to load to point to the new location of the HTML template

Set up scheduling on the new server

Scheduling and alerts are cron jobs and must be set up on the new server.

  1. Set up scheduled tasks.

That's it.  You're done. Your knowledgebase is on the new server and should be working exactly like the old one. 

Licensing and right to run

Please note that before you run KBPublisher on the new server you should completely remove it from the old one. Failure to do so may lead to a licences violation.

Your purchase of a KBPublisher license grants you the right to make use of a single instance of the software. You may temporarily install a second instance of KBPublisher on an internal development server for testing and deployment planning, but only one instance of KBPublisher shall be in operation (available for access to your admin users or end users).

Article ID: 300
Last updated: 26 Sep, 2013
Revision: 27
HowTo, Tips & Tricks -> KBPublisher -> How Can I Move KBPublisher to Another Server?