I am a newbe. I have Local installed and working just fine. What I am trying to do is to update an existing site (hosted at InMotion) to the latest WordPress, php, etc. I want to test this locally so I don’t bring my live site down until I have tested and locally.
I can see where Local can update (or create) a Hosted site but not the other way around.
Is there a way to do this?
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
System Details
Local Version:
Can’t find it but I just downloaded and installed over the weekend
Operating System (OS) and OS version:
Windows 10 Pro, 22H2
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
You would need to get a copy of the site at InMotion and import it into Local. You could use the free WP Migrate Lite plugin to create a site export zip file for that purpose.
Once you get your site into Local and get it updated, then you’ll have to migrate it back to InMotion from Local in order to refresh it with your changes. You can do this with a premium migration plugin like WP Migrate DB PRO, or it’s always a good idea to check with your host (InMotion) to see if they have any migration services or recommendations that work best with their platform.
Thanks Nick. Got the site into Local.
When I setup the site in Local, I accepted the defaults. I seem to remember when I did, that the MySql default port was not 3306. The imported site fails to get to the DB (wp-config.php was updated to my localhost DB_NAME, DB_USER, DB_PASSORD and DB_HOST. I suspect the port that is the default needs to be set to 3306 (which is my local db port). Is this settable or do I need to create a new local site?
All I see is “Error establishing a database connection” when I “Open Site”.
There are no other Services running other than the MariaDb Service which is currently on localhost:10012. Strangely enough, it appears that when the MariaDb Service is restarted after changing the .ini to a different port, Local changes the db port? Obviously I am missing something. I changed the MariaDb .INI back to port 3306, now the Local db Port does not change. Right now Local DB port = 10013. Presumably somewhere behind the scenes Local gets from 10013 to 3306, correct?
As an aside, I have a major challenge before me. The site (on the imotion host) is very old and has significant garbage I need to remove. It is using an old version of Wordpress (4.7), a very old version PHP (5.5). Once, and if, I can get past the DB issue, there are a number of php issues I will need to resolve. Any suggestions would be greatly appreciated. (tools, approaches, or just in general)
Local’s port configuration is going to depend upon your Router Mode. You could try changing your Router Mode to Site Domains and see if that makes a difference? (Preferences>Advanced>Router Mode) More on this here:
As far as the development work goes, the oldest PHP version in Local is 7.3.5. We don’t currently have any instructions or easy steps in order to add older versions so you might have to see if you can get the site to load there.
The WordPress version is a little bit simpler, one of our favorite users has a great plugin here that you can use to roll back core:
I need to understand better how databases and ports work in Local.
I created a site in Local called AP-Visions.com.
Web Server: Apache
PHP version: 8.2.23
Database: MariaDB 10.4.10
WordPress: 6.6.2
Multisite: No
Copied a site (ZIP) and unzipped to Local Sites\app\public.
The sites wp-config.php
define(‘DB_NAME’, ‘db’);
/** MySQL database username /
define(‘DB_USER’, ‘db’);
/* MySQL database password /
define(‘DB_PASSWORD’, ‘db’);
/* MySQL hostname /
define(‘DB_HOST’, ‘localhost’);
/* Database Charset to use in creating database tables. /
define(‘DB_CHARSET’, ‘utf8mb4’);
/* The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ‘’);
define(‘FS_METHOD’, ‘direct’);
define(‘FORCE_SSL_ADMIN’, true);
I have MariaDB running as a service on port 3306 and, using a client (SQLYog) can log into the Database with the credentials from wp-config.php
How does Local know the port for the database is 3306?Or does it?
I tried both Site domains and localhost routing and neither work
Clicking on Open site just shows some php code in the browser.
If you click on the Database tab in your Local app it will show you what port Local is using. If you’re using a DB tool you might have to match up the configurations.
2-3) No doubt the site is likely broken from the PHP change if it was running 5.5 and is now trying to run on 8.2. There have been some major breaking changes in the PHP code between those versions. I’d recommend disabling all plugins and maybe try swapping the theme if you’re having trouble accessing the website. You can do this by just clicking on Site Shell and using WP-CLI like wp plugin deactivate --all.