Database and Uploads Syncing in WordPress | Manual and Automatic

Поділитися
Вставка
  • Опубліковано 18 лют 2020
  • In this video, I go over how to sync your Database and Uploads from a live server to your local development server. I show off an easy (paid) way to do it and a manual (free) way to do it. Either way can be helpful to #WordPress freelancers! It just depends on how often this is something you need to do.
    WP Migrate DB Pro: wpcasts.tv/go/wpmigratedbpro
    💖 Become a Patron to show support & get perks!
    / wpcasts
    Sign up for the newsletter. Free course coming in 2020:
    wpcasts.tv
    *SOCIAL*
    Twitter: / alexanderbyoung
    Instagram: / the_alex_young
    Facebook: / wpcasts.tv
    #Freelancing #Database
  • Наука та технологія

КОМЕНТАРІ • 30

  • @WPCasts
    @WPCasts  4 роки тому +13

    Correction! Do not find and replace the SQL file using a text editor. As other comments pointed out, it will mess up serialized strings. It would be better to use a different plugin or the WP-CLI! I apologize for the misinformation. It was a dumb mistake 😩

  • @DaveMcHale
    @DaveMcHale 4 роки тому +5

    Nice video dude! Constructive feedback on a few things in your "manual" process you showed ... the reason manually editing a SQL file makes you a monster (as you put it :) ) is because doing a find/replace risks messing up your serialized data. You should grab the SearchReplaceDB tool made by interconnect and use that, or use the command available via WP-CLI (which was built from interconnect's code) for doing your search/replace instead, since those tools WILL properly update serialized data string lengths.
    Second, yes simply downloading the wp-content folder makes sure that viewing your content works that uses those files, but it won't actually add the images to your Media Library since unfortunately the database doesn't update itself when new files are physically added to the folder. To do that, you need to use something like the "Add From Server" plugin after downloading the physical files, since that can create the database entries for those uploads.
    Good presentation though and I'm subbed now. Cheers!

    • @WPCasts
      @WPCasts  4 роки тому

      Agreed. Should have done a normal SQL find and replace! Lesson learned!

    • @DaveMcHale
      @DaveMcHale 4 роки тому +2

      @@WPCasts afraid that still won't fix your serialized data issue, that's why you need to use the specialized tools :) The problem is that serialized data tracks the LENGTH of the strings it is storing. Say for example you replace the 10-character string "mysite.dev" with the 14-character string "mylivesite.com". Doing a simple find and replace using a text editor (or using normal SQL find and replace), you will change the strings themselves but the serialized data will still think it's storing a 10-character string, even though you changed the length of the data. WPEngine has a decent article here that explains what serialized data looks like what the potential issues are when changing that data haphazardly: wpengine.com/support/wordpress-serialized-data/

    • @WPCasts
      @WPCasts  4 роки тому

      Makes sense now! Thank you :)

  • @LucXX36
    @LucXX36 4 роки тому +1

    First of all. ThumbsUp for the nice "intro". Made me smile. Thanks for the video!

  • @MarketingProf.
    @MarketingProf. 3 роки тому

    Thanks for the recommendation!

  • @imoddi
    @imoddi 3 роки тому

    Tank you for sharing this information!

  • @TheMarouuu
    @TheMarouuu 4 роки тому

    How about "What's up you Wordpress Castouts!", has a nice ring to it :)
    Great video as always!

  • @perfectbee
    @perfectbee 4 роки тому +2

    I purchased WPMigrate, largely because of what I saw here. I was already interested in it but greatly respect the opinion and insight here and it put me over the edge. However, WPMigrate is pretty good but has one fatal flaw that may result in my asking for a refund. In short, it's a delicate little flower!
    For example, if I do a sync from my production server to a local server it might run for, say, 30 mins downloading files, etc. But if it has ANY issue at all during that process - a minor network outage, for example - it will report an error and completely roll back the sync.
    I just had this happen (again) on another server sync after about 30 mins. At about the 93% mark I had a file fail download, for whatever reason. The file involved was utterly minor (and actually not necessary - would have happily removed it). But there is no Ignore or even Retry option - it just rolls back the entire sync. Very frustrating indeed.
    It doesn't really matter how often this happens - even if it is rare, the inability to take any action to workaround this makes sync a very nerve wracking process, until complete.

  • @ezswan
    @ezswan 4 роки тому

    ok so is it necessary to even have the blog posts on your dev site? cant you just exclude pulling the blog posts and also the same thing when you upload to production site? so can you upload to production site without deleting blog posts?

  • @mikexavier
    @mikexavier 4 роки тому +1

    I've been using updraftplus to create a backup of the live site, then restoring from that backup on the local version of the site (which does the search and replace for you). I would love to hear your thoughts on the downsides to doing it this way vs using sequel pro / ftp / SearchReplaceDB by interconnect (as Dave mentioned)?
    I think like you said when you start actively working on lots of clients sites, something like WP Migrate DB Pro would be amazing.

  • @TheDrumChannel
    @TheDrumChannel 2 роки тому

    I assume that if I had a local sql table behind the companies firewall and I wanted to sync from that to the Wordpress site database - the plug in that you mentioned could do a push (local sql data >wp database) rather than a pull

  • @johanstam3602
    @johanstam3602 3 роки тому

    Is there a smart way to sync WooCommerce entities from old design live site before uploading new design local site?

  • @MariaTheresaZulueta
    @MariaTheresaZulueta 3 роки тому

    Hi does wp migrate pro works with builder as well such Elementor?

  • @IAMATUNKU
    @IAMATUNKU 4 роки тому +1

    Hey Bro. Thanks for the videos, I am wondering if you can help to solve a related problem.:
    I am developing a WP site of a hotel which uses a standard Hotel management System Plugin, however the chanllene is that due to the location of the Hotel and the cost of running the internet 24/7, i am tasked to find a way that the live website and the local website sync such that all changes made on the local site will be updated on the live site and vis visa. Note i can not afford to replace either entries on the database ie. either of the local or live database entries.
    i only need to update them with either/both entries. Also i need to be able to ensure that this is done automatically as soon as the local server is connected to the internet.
    i fell really stock and need help.
    Thanks

  • @niay79
    @niay79 Рік тому

    Could we sync WP by NAS? What I mean is we don't really host on own NAS, but handle it local (avoid lag or file transfer/ upload time ), then sync/ update to the online version, maybe daily.
    Keep data is only for backup, sorry I just new for NAS and wordpress.

  • @baztheman
    @baztheman 3 роки тому

    can you confirm what you have done is a COMPLETE site migration? Meaning, when you sync the sites from remote, you are going to wipe out the local site? What about making just one or two changes?

  • @zakariaelou
    @zakariaelou 11 місяців тому

    Does WP Migrate automatically ignore its own environment specific settings? Thanks!

  • @birdbrainsolutions6112
    @birdbrainsolutions6112 4 роки тому

    I've seen your videos since the 'how to fix slow wordpress' one, please create one on how to setup underscores theme, especially the nav menu part.. Basically I want to create a theme like oceanwp with underscores

  • @birdbrainsolutions6112
    @birdbrainsolutions6112 4 роки тому +2

    oh hi, didn't see you there on this video either, lol

  • @fakegray
    @fakegray Рік тому

    WP Migrate no longer has separate plugins for media files. You might need to update the video.

  • @satya.antonio
    @satya.antonio 4 роки тому +1

    How about git?

    • @satya.antonio
      @satya.antonio 4 роки тому

      drop the database from the cli, and edit the each of the copies config PHP with the domains.

  • @woutertt
    @woutertt 4 роки тому +1

    The Roots sync script with Trellis is worth checking out as well!

    • @KapiteinBaardbaard
      @KapiteinBaardbaard 4 роки тому

      Could you tell me which one you mean and where I can find it?

    • @pawieplays
      @pawieplays 4 роки тому

      I’m not using roots but is this possible using normal WP structure?

    • @woutertt
      @woutertt 4 роки тому

      @@pawieplays Not sure, go ask the guys over at roos.io, they're always happy to help out.