# Push Issue from Local to WPEngine

**URL:** <https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341>\
**Category:** Support\
**Created:** [March 31, 2020, 1:19pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341 "2020-03-31T13:19:45Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gamalon](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@Gamalon](https://community.localwp.com/u/Gamalon)\
**Post date:** [March 31, 2020, 1:19pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/1 "2020-03-31T13:19:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jonc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/jonc/32/10044_2.png) [@jonc](https://community.localwp.com/u/jonc)\
**Post date:** [March 31, 2020, 6:23pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/2 "2020-03-31T18:23:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sirshanksalot](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/sirshanksalot/32/10046_2.png) [@sirshanksalot](https://community.localwp.com/u/sirshanksalot)\
**Post date:** [March 31, 2020, 11:11pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/3 "2020-03-31T23:11:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jonc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/jonc/32/10044_2.png) [@jonc](https://community.localwp.com/u/jonc)\
**Post date:** [April 1, 2020, 7:47pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/4 "2020-04-01T19:47:24Z")

</div>

Adding that I’m on Local 5.2.8/Win10.

---

<div class="post-metadata">

**Author:** ![alexmustin](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/alexmustin/32/10066_2.png) [@alexmustin](https://community.localwp.com/u/alexmustin)\
**Post date:** [April 2, 2020, 5:24pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/5 "2020-04-02T17:24:43Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Gamalon](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@Gamalon](https://community.localwp.com/u/Gamalon)\
**Post date:** [April 2, 2020, 6:33pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/6 "2020-04-02T18:33:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alexmustin](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/alexmustin/32/10066_2.png) [@alexmustin](https://community.localwp.com/u/alexmustin)\
**Post date:** [April 2, 2020, 6:45pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/7 "2020-04-02T18:45:14Z")

</div>

I agree 100%

---

<div class="post-metadata">

**Author:** ![Julio](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/julio/32/9246_2.png) [@Julio](https://community.localwp.com/u/Julio)\
**Post date:** [April 3, 2020, 4:53pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/8 "2020-04-03T16:53:30Z")

</div>

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.**

---

<div class="post-metadata">

**Author:** ![jonc](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/jonc/32/10044_2.png) [@jonc](https://community.localwp.com/u/jonc)\
**Post date:** [April 3, 2020, 7:24pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/9 "2020-04-03T19:24:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dannyweber](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/dannyweber/32/10086_2.png) [@dannyweber](https://community.localwp.com/u/dannyweber)\
**Post date:** [April 3, 2020, 8:19pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/10 "2020-04-03T20:19:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ssnyder](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@ssnyder](https://community.localwp.com/u/ssnyder)\
**Post date:** [April 10, 2020, 8:31pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/11 "2020-04-10T20:31:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![claytoncollie1](https://avatars.discourse-cdn.com/v4/letter/c/3bc359/32.png) [@claytoncollie1](https://community.localwp.com/u/claytoncollie1)\
**Post date:** [May 12, 2020, 5:31pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/12 "2020-05-12T17:31:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [August 10, 2020, 5:31pm UTC](https://community.localwp.com/t/push-issue-from-local-to-wpengine/18341/13 "2020-08-10T17:31:31Z")

</div>

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