Improve Staging Deployment for Wordpress Sites with better Find/Replace
I have found a problem with the Staging deployment for my wordpress sites.
Some plugins and themes store serialised arrays in the wordpress options. This is a valid technique that results in less DB calls.
However, if you simply do a find and replace on URLs in the database, the serialisation of the array will break. This means that the Staging site will lose the settings in the plug-ins and themes.
If you don't realise this, and push the changes back to Live, the Live website will break.
A related problem is with premium plugins and themes that are licensed to a specific domain. Of course, the Staging site is on a different domain, and so some plug-ins may require a different license key.
Again, this is a find and replace challenge when migrating to and from Staging and Production.
I have got around this problem by using WP Migrate Pro plug-in, which performs and intelligent and WordPress optimised migration. Of course, it would have been better to have this functionality in Cloudways.
+1 Seems like this should be a priority if they tout true one button push/pulls. Losing information in serialised arrays should not occur.
Igor Honhoff commented
I have the same issue on my site. I contacted support to help me with this and they were able to successfully replace all the urls in serialised arrays but this should happen automatically when cloning or creating a staging copy.