tldr; You can make ManageWP’s Sync Local tool work if you edit the wp-config.php file to include your database’s port number. And downloading backups from ManageWP import well into Local using Locals Import function.
A little background
We use ManageWP and multiple hosts. TBH, at this point not sure I can live without it.
We REALLY wanted to use Local and ManageWP together somehow. We even tried the new Livelink with no real luck.
While using the ManageWP - Local Sync (beta)-, it would authenticate but then errored out.
It was crashing when connecting to the database. Hmm
The error was connection actively refused. I see that often since I use docker and get the port wrong for the database.
So I went into the wp-config.php file.
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
Wait, no port number, hmmm, what if I do this?
define( 'DB_HOST', 'localhost:10004' ); // (use the correct port number of course)
Ok after putting the port number in BOOM !
ManageWP will sync back and forth !!
There are a couple of error messages but seems to be files that should not be synced anyway. The cool thing is, its a real sync using Diffs rather than ManageWPs clone.
OH, also if you have not discovered it yet. In ManageWP, you can download a backup of a WordPress site. That backup imports well into local by using local’s import function.
A couple of caveats;
The sites I am syncing originated from ManageWP and were brought down and added to local with the backup method I just listed. I have not yet tried creating a site and pushing it to an existing ManageWP site.
I am using Local version 5.6.3+ (Pro) on Windows 10.
have not done a deep dive into all the sync abilities yet tose what works and does not. However, at this point, it would be a ManageWP issue not Local
@ChipBurris - So I’d previously had local sync working using the DB_HOST edit you’d mentioned here but it seems something has changed recently with Local Sync and it’s no longer working for me.
I get the following error when trying to sync:
We could not detect active Worker plugin v4.6.2+ on https://*******.local/. If you mistyped the URL, you may close this window and try again. You can activate the plugin now, and run the check again. If this check does not seem to be working correctly and the latest plugin version is already active, you can continue anyway.
If I try to continue anyway I get PHP Errors:
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in C:\Users\*****\Local Sites\*****\app\public\wp-content\plugins\worker\src\MWP\EventListener\PublicRequest\CommandListener.php on line 189
( ! ) Error: Cannot use object of type stdClass as array in C:\Users\*****\Local Sites\*****\app\public\wp-content\plugins\worker\src\MWP\EventListener\PublicRequest\CommandListener.php on line 189
I’ve got a ticket open with ManageWP as well but was just wondering if you’d encountered anything similar?
Thanks, have you had any further luck with this?
I’m attempting to get it to work and the database message you’ve recommended here worked, just want to pull down a full fresh copy of the site.
We could not detect active Worker plugin v4.6.2 + on http://listivo.local/ . If you mistyped the URL, you may close this window and try again. You can activate the plugin now, and run the check again. If this check does not seem to be working correctly and the latest plugin version is already active, you can continue anyway.
I install latest version of plugin but I can’t connect via MenageWP.
Ahh, that makes sense. This is because the remote site has no way of knowing specifically how to access the site on your Local machine.
For example, let’s say that you and I both create a site named “awesome-client-site” and each has a domain of awesome-client-site.local.
Because only our computers know what the name and domain is for those sites in Local, there isn’t any way for the remote site to know how to get to your specific site within Local.