syntaxseed,
@syntaxseed@phpc.social avatar

There is not enough detailed info about how to keep versioned & synchronised between dev, staging & prod.

All the info I've found so far boils down to "use this 3rd party service" or "do some haphazard copying database dumps back & forth" or "just make your changes 3 times".

I just can't fathom why there isn't more writing about this.

thomastospace,
@thomastospace@phpc.social avatar

@syntaxseed I think it comes down to 'there's no better way'.

When I worked on Wordpress, we had all our code in custom plugin/theme. These are versioned of course.

If we needed pages/products/etc. from production, we used WP Migrate DB Pro to pull the database without customer data.

Yes... If we needed to adjust something in the database, that happened 3 times. Locally, staging & prod. Luckily that was rare.

I haven't found a better way since. If you find it, I would love to hear about it.

gmazzap,
@gmazzap@phpc.social avatar

@syntaxseed Because it is extremely hard. Your script approach works up to the point you have to syncronize media, that are very coupled with DB. If your site is small enough, you can figure out something anyway. To solve that issue with big sites you need to do things at infrastructure level or go to managed hostings that have it figured out for you.

heiglandreas,
@heiglandreas@phpc.social avatar

@syntaxseed what do you mean: staging, prod, dev... ????

🙈

iamdtms,
@iamdtms@mas.to avatar

@syntaxseed Sync WP in db layer & fs with git could be enough. Handling 3 variant is an unnecessary pain, but making work with personal concept is a success.

michael,
@michael@thms.uk avatar

@syntaxseed yeah, it's one of the main reasons why I hate working with WordPress so much. The more time passes, the more subtle differences you are going to accrue between the various environments, and it becomes almost unmanageable.

syntaxseed,
@syntaxseed@phpc.social avatar

I started writing a cli tool to sort of do this. It takes db snapshots & imports them & uses wp-cli to search & replace paths & urls in the db.

But if your prod site isn't static, you are snookered.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • wordpress
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines