Using ManageWP with Local (HowTo)

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;

  1. 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.
  2. I am using Local version 5.6.3+ (Pro) on Windows 10.
  3. 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
2 Likes

Thanks! I’m still trying to get to know how to work this tool but I appreciate you letting me know that it’s possible. lol

@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?

I will check into this. Have not had to do this recently

It works for me too!

I’ve been trying to figure out why, it didn’t work several times and now I finally found a way.
I’m so happy, because it’s a brilliant tool.

Thank you for sharing this solution. :slight_smile:

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.

For me, it’s still doesn’t work. I stuck on this:

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.

Hey @BartTD – can you give us a little more detail about the environment that you are using?

  • What version of Local are you using?
  • What Operating System and OS version is being used?
  • Can you please provide your Local Log? See this Help Doc for instructions on how to do so:
  • Does this happen for all sites in Local, or just one?
  • Are you able to create a new, plain WordPress site?

Hey,

  1. I have the latest version of Local

  2. I use Windows 10 and macOS

  3. I attached logs
    local-logs.zip (41.5 KB)

  4. Despite this error, I managed to start the file transfer from the computer to the Live side, but the other way around, it does not work.

  5. Yes, with any problems

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.