Push Issue from Local to WPEngine

Running into issues here with the DB mainly. Pulling down has worked fine but can be a bit slow.

It looks like it is having issues with search/replace on push. Has anyone else had this issue? and found a way around it (outside of doing it manually which is what I’ve started to do)? Seems kind of pointless and WP DB Migrate Pro is a better option right now.

2 Likes

I just discovered Local recently, and I did my first push back to WPEngine after doing some preliminary dev work locally. I noticed a similar issue. Attempting to visit my wpengine dev URL after a push redirects me back to my local domain. Is there a best practices workflow for migrating site + database back to wpengine with URLs updated?

Similarly I have just discovered and started using local to pull down our WP Engine environments. That is working a snap, and so less drama than trying to troubleshoot mySQL nightmares in other LAMP stacks (I’m looking at you MAMP!)

However that ease of use is ironically not carry through to pushing the DBs with me either. I spent 3 hours with WP Engine support a couple days ago and could not find a solution yet, waiting to hear back. General advice we tried such as disabling any potentially interfering plugins (WordFence in particular and dumping it’s tables).

However, these same issues all occurred with a completely Vanilla new environment spun up on WP Engine and immediately pulled, change of something minor like the site name and trying to push back.

Inspecting the error logs it was consistently erroring out when pushing the local.sql db.

Would love a solution to this. I’ll report back any positive developments if I hear back from support.

Adding that I’m on Local 5.2.8/Win10.

I can confirm I am also having this frustrating issue.

I am using Local on Mac - Version 5.2.8+2771

Pull from WP Engine:
Works fine, does a proper Find & Replace on localhost database.
Pulls database, all website files, and all assets from WP Engine.

Push to WP Engine:
Pushes database, and the updated theme and plugin files, to WP Engine.
Consistently misses new Media Library items.
Does not do a Find & Replace on the WP Engine database.

This requires us to do the following every time we Push:

  • Do a Find & Replace manually in phpMyAdmin just to get the site to work
  • Then, once we are able to login, do a Find & Replace using a Plugin
  • Then, manually copy new Media Library files to WP Engine via FTP

Frustrating!

Thats the same method I’ve adopted. Its not really any quicker than what I was doing before. WP DB Migrate Pro did make it a lot easier as it handled all that for you.

One thing to note if you push a few times it does seem to “fix” the library with missing files but still isn’t all the time.

1 Like

I agree 100%

One thing that could be tried is to check the Router Mode in Local.

Go to Local Preferences > Advanced Tab: If the router mode is set to site domain try switching to localhost.

Local will show an error regarding the Local host but if you click “fix it” that should clear up and work. Then try the push again and see if that works better for you.

Note: if you’re using https on the site it will disable SSL functionality as HTTPS isn’t available when using localhost routing mode.

1 Like

I just wanted to add that, at least for me, it appears that the Push scripts aren’t updating the site and home URLs in the SQL database, so those are still redirecting to the Local .local domain. As far as I can tell, all (or nearly all) of the other URLs are being updated in the push. If I edit those in the phpmysql backend and purge the browser cache, I am able to access the site on WPEngine after a push. So that’s a bug that will need to be resolved in a future update. I don’t why the search/replace is somehow missing those two fields?

I just did my first push to WP Engine from Local. When I visit the site, it says there is no database connection. I just did 4 hours of work on the site. Hoping I can get this resolved. Any tips?

I was having issues with the site url also being redirected and media file issues. This worked for me. Thank you.

You final steps can be a bit easier if you use the WP CLI.

First setup an SSH key on your user profile with WP Engine.

Once that is working (wait 10 minutes) you can SSH into a single install and run

wp search-replace "https://oldomain.com" "https://newdomain.com" --precise

I know this is not ideal but you dont need to get into phpMyAdmin or login to get it workin properly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.