This article was last updated on the January 2, 2017.
With the release of v4.0.0 of X comes an additional update to the way we package and implement our shortcodes in the theme. Previously, our shortcodes came packaged in our X – Shortcodes plugin, which is required when running X as many scripts are placed in there that must also be used by the theme. As of v4.0.0 of X, X – Shortcodes has been retired in replacement of our new plugin: Cornerstone.
Cornerstone essentially includes all of the previous functionality of X – Shortcodes with some major updates:
- The inclusion of our completely custom, frontend page builder, which allows users to utilize all of our shortcodes in real-time without needing to handcode anything into the editor.
- The modification of a few of our key structural shortcodes due to the addition of our frontend page builder (include more information about sections, rows, and columns here).
Migrate from X – Shortcodes to Cornerstone
Migration between X – Shortcodes and Cornerstone is a breeze. When you update to v4.0.0 of X, you will be prompted to install Cornerstone as it comes bundled with X. Upon doing so and activating the plugin, simple go to X – Shortcodes and deactivate it, as well as deleting it (as it will no longer be used). That’s all there is to it! Once you’re up and running, it will be important to take note of how Cornerstone integrates with your theme and how to utilize it. For information on these subjects, make sure to check the Knowledge Base out for more detailed articles in those areas.
Migrate Cornerstone Data from Site to Site
This section of the article will cover moving Cornerstone content from one site to another. Cornerstone uses the WordPress APIs for content management, so changing a domain would be the same process as moving a WordPress site. The main things to consider are:
- Every occurrence of your domain throughout the content is replaced
- The method used for replacement should support serialized data
- Moving WordPress (WordPress.org Codex)
- Step by Step guide to moving WordPress to a new domain (WPMU DEV)
- How to transfer WordPress (Siteground)
Before we get started you should have the following:
- Existing WordPress site you want to transfer Cornerstone content from
- New WordPress site on a different domain or sub directory or sub domain that you want to transfer Cornerstone content to.
It’s presumed both sites are a single site install (not multisite). Though following this article should work perfectly fine on multisite instances as well, just with a few minor differences, i.e, network admin, rather than wp-admin etc.
So let’s get started, first up enter your wp-admin on the site you want to migrate from. Go to plugins > Add new.
In the top right search bar, type “WP Migrate DB” and press enter
“WP Migrate DB” should be the first plugin you see, don’t worry if not, just scroll down till you find it. Once you’ve found it click “Install now”. WordPress will begin downloading the plugin, once it’s been installed you should see a screen like this.
Click “Activate Plugin”.
Migrating your database
Now you have the plugin installed, in your wp-admin navigate to “Tools > Migrate DB”. Make sure you have both of the checkboxes at the top checked, these are “Save as file to your computer” and “Compress file with gzip”.
In the “Find” section, you should see your url of the site you are migrating from (if not add it), make sure the link is relative, i.e, //yoursite.com and not http://www.yoursite.com.
Below that in the “Find” section as well, you should have the path to where your website is located, for example /home/sites/yoursite.com/public_html/
Now in the “Replace” section, first in the top section, enter the URL of the site you are migrating to, i.e (yournewsite.com) remember, the link is relative //yournewsite.com and not http://yournewsite.com
Under that also in the replace section, you should enter the path to where your new site is. For example /home/sites/yournewsite.com/public_html/, this should be the root of your new install, so if your site was in subdirectory it might be /home/sites/yournewsite.com/public_html/subdir/
Advance Options (required!)
Now you’ve successfully entered the URls you’re moving from and to, next up it’s time to check out some of the advanced options, don’t worry, it’s not scary! Just follow this guide and you’ll be fine. 🙂 On the Migrate DB page “wp-admin > Tools > Migrate DB” and click “Advanced Options”.
Here you’ll see five options which are:
- Replace GUIDs
- Exclude spam comments
- Exclude transients (temporary cached data)
- Compatible with older versions of MySQL (pre 5.5)
- Exclude post revisions
By default, “Replace GUIDs, Exclude transients (temporary cached data), Compatible with older versions of MySQL (pre 5.5)” are all checked. We’ll keep all those checked apart from “Replace GUIDs”, this is very important we uncheck “Replace GUIDs”.
The GUID field is primarily used to create the WordPress feeds. A feed reader uses the GUID field to know whether or not it has displayed a particular item before. Changing the GUID will mean that feedreaders will suddenly display your content in the user’s reader again as if it was new content. You can read more about GUIDs and why they shouldn’t be changed/removed/modified here GUIDs
Now let’s migrate!
Congrats! You’ve got all your settings ready to go, now let’s migrate, click the “Migrate button” and you should see a screen like this
Worth noting here, if your database is large, you can pause the migration and restart it later on, perfect for if you have to leave for a few minutes, if not, just leave it running and don’t click anything. At the end of the export, you should see a “export” complete screen like this.
And on your computer, you should see the option to save the export zip, click “Save file” Now you have the export saved, it’s time to upload.
Before we go any further, make sure you have a new WordPress site setup that you want to migrate to, remember this article only covers migrating Cornerstone, it doesn’t cover migrating your customizer settings, migrating files and images or migrating any other type of content. You can find more details about migrating that type of content content Here
PHPMyAdmin and importing your content
For the next step, you’ll need to enter your database management tool (normally phpmyadmin) from your hosting control panel. It may be labeled “PHPMyAdmin”, “Database management” or similar.
For the purpose of this article, we’re going to use PHPMyAdmin as it’s the most common. You should see a screen like this
Now click “Import”. Which should present you with a screen similar to this
Now to import, click “browse” to select the zip file you just saved and downloaded in the previous step. Make sure you uncheck “Partial import” While this allows it to interrupt the script when it’s close to hitting a PHP time out limit, it can break the import, as we want to import the whole database, we don’t want to allow it to do this, we’d rather it just failed completely than import partially.
Leave the format as “SQL” and click “Go”.
Congrats! You’ve now successfully moved Cornerstone from one domain to another without anything breaking!
As always with any migration, just go through a few pages, check everything works as expected and that you can edit the pages and posts in Cornerstone.
Hit some problems? Don’t worry, open a new topic Here and our amazing support team will be right along to assist.
Alternative plugins for migrating
There’s many different plugins you can use to migrate, in this article we only covered using WP Migrate DB, but here’s some other popular alternatives.