Local by Flywheel: Update Links in Database

Local By FlywheelThis post is part of the series on Local by Flywheel.

In the last post of this series, I restored the database from my live blog into Local by Flywheel. The next step is to change the references in the database from my live domain address (http://www.azurecurve.co.uk) to the one local to Local by Flywheel (azurecurve.local).

I did this by running the following SQL query against the database using mySQL Workbench:

/*
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).
*/
UPDATE
	local.azc_options
		SET
			post_content = 
						REPLACE(
								post_content
                                , 'http://www.azurecurve.co.uk'
                                , 'http://azurecurve.local');
UPDATE
	local.azc_posts
		SET
			post_content = 
						REPLACE(
								post_content
                                , 'http://www.azurecurve.co.uk'
                                , 'http://azurecurve.local');

Click to show/hide the Local by Flywheel Series Index

Local by Flywheel: Upload Own Database

Local By FlywheelThis post is part of the series on Local by Flywheel.

To migrate an existing site into Local by Flywheel, the first step is to restore your database. To make the backup, I used the mySQL Workbench, but many tools can be used to make and restore a backup of the database.

The first step is to backup your database from your current web host. Once you have this backup file, you need to restore it to the Local by Flywheel database.

The connection details for this database are available from the Local by Flywheel app on the Database tab:

azurecurve Database page

With these details you can use mySQL Workbench to connect and restore the database.

Click to show/hide the Local by Flywheel Series Index