It may be that you need to move Cab Grid to another website – say from a development site to a live site – and, in doing so, preserve the settings, prices, messages, and other configurations. This article discusses techniques for copying Cab Grid data from one web site to another.
Changing Domain?
Before moving any Cab Grid Pro data, it is important to notify us if the domain (address) of the site is changing. This is because the installation of Cab Grid Pro is tied to the domain entered on purchase.
Whole-site Migration
If the whole site is moving, the simplest solution is to use a migration plugin. This will export all posts, pages and plugin data and allow import it directly to the new site. The WordPress plugin directory offers many to choose from.
After installing an appropriate migration plugin, following their provided migration process will usually result in everything required to transfer Cab Grid from the old site to the new site. It may not be necessary to perform any of the following actions.
Plugin File Migration
This is necessary if a migration plugin is not used, or only Cab Grid is being transferred to a new site, or the migration plugin does not support file transfer.
Assuming WordPress is already installed on the new site, The Cab Grid plugin directory will need to be copied from the old site over to the plugins directory on the new site. This can be done via FTP, or the original ZIP file supplied on purchase can be uploaded via the Plugins > Add New > Upload Plugin functionality on the WordPress administration pages for the new site.
Using FTP to download the most up to date version of the plugin files from the old site and then upload these to the plugins directory on the new site (usually /wp-content/plugins/ ) will result in the most compatible version being transferred.
Add-ons, such as the Booking Management add-on or Stripe add-on, will also need their files to be transferred (or re-installed) to the new site.
Moving the plugin files will result in a bare-bones (un-configured) installation of Cab Grid (or associated add-on) being installed on the new site. The next step is to copy Cab Grid data from the old site.
Cab Grid Data Migration
This is necessary if a migration plugin is not used, or only Cab Grid is being transferred (independently of other WordPress data).
As of Cab Grid Pro version 5, it is possible to export price data from the old installation and import that data to the new installation. However, some other settings and data will still need to be manually copied from the database.
All WordPress data is stored in a database. This is usually a mySQL database installed on the web server (or near-by networked server). This database can be accessed directly using a software tool such as phpMyAdmin or Sequel Pro or mySQL Workbench. There are also plugins that can provide many mySQL management functions within the WordPress admin.
The credentials for accessing the database (database host address, login username and password) are stored in the wp-config.php file on the web server. They are also often provided by the hosting provider when a site is set up. Access details for both the old and the new site will usually be required.
Assuming access to the mySQL database containing data for the old site, the tables that need to be copied will all contain ‘cabgrid‘ in their name. WordPress offers the ability to customise the table prefix, but it is usually ‘wp_‘. So, Cab Grid data tables will all start something like, ‘wp_cabgrid…..‘
Using the mySQL management software, EXPORT all Cab Grid tables. This will usually provide files (to save or download) – usually one for each table.
Accessing the new site’s mySQL database using the management software, IMPORT all tables using the files previously downloaded.
This will move all vehicles, areas, and prices in the main plugin. If add-ons are installed their data will be moved too. However, with Cab Grid Pro v4.5.16 or earlier, some configuration options are stored within WordPress’s main options table. These include custom messages, custom CSS, custom form fields, and various other settings. This data will need to be manually moved over to the new database. (Cab Grid Pro v5 store all data in its own tables.)
NOTE: If Cab Grid [Pro] has already been installed, activated and accessed on the new site, some Cab Grid data may already have been generated and stored in the new site’s database. This new/default data should be removed before copying data from the old site database. This will avoid duplicate data causing problems.
In the mySQL database for the old site, the WordPress options table will usually be called, ‘wp_options‘ (depending on the table prefix). Access this table to reveal its content. Filter the table rows to only show those whose option_name value contains cabGrid (see pic, right).
Select these rows and copy them to the new database. Techniques to achieve this will vary depending on the sql management software. Sequel Pro for Mac, for example, will allow the rows to be selected and a right-click give a contextual menu with the command, ‘Copy as SQL Insert’. This would enable the string copied to the clipboard to be run as an INSERT command in the new database’s Query pane.
Conclusion
If all requirements have been met, Cab Grid should function identically on the new site.
I hope a simple migration/export/import tool can be provided in the near future, so all settings and prices can easely be transferred to another WordPress installation.
The upcoming version 5.0 of Cab Grid Pro might simplify this process, but with many migration tools already available for WordPress it may be that we do not develop a dedicated tool for some time.