MainWP Community

Cloudways push/pull operations via API

As a fellow lover/user of Cloudways and MainWP I’d love to drop an integration idea for the Devs.

A Problem and an Idea
One problem I’ve been having is whenever I use Cloudways built in staging features, it breaks the connection to the sites in MainWP Dashboard.

With Cloudways API would it be possible to better integrate Cloudways push/pull operations via MainWP’s Dashboard? Maybe as new extension?

Hi @Gadgitmatic, I moved this away from the Welcome topic for you.

Doing a quick look at the API it appears it would be possible but I would want to wait until @MustaasamSaleem was able to review your request before I said wether it could or could not be done.

2 Likes

Thanks @dennis for the mention.

@Gadgitmatic I’m glad you like the services we offer.

I’m a bit confused about the workflow. What I understood, you have X websites on the other hosting providers and the MainWP dashboard is on Cloudways.

You created staging app of MainWP dashboard and when you are pushing the changes to the MainWP Dashboard application, the connection to the websites on other hosting providers breaks.

Is this the query, or I get it a bit wrong?

@MustaasamSaleem
Thank you both for your time. I’ll go into a little more detail.

I have X number of websites hosted on Cloudways and being maintained with MainWP.
MainWP is capable of completing the vast majority of tasks needed to update, test, and maintain all the sites with the exception of being able to push/pull updates to and from the staging sites (also maintained on MainWP).

While yes, I can log into Cloudways to simply push/pull from staging sites - it would be a great time saver to be able to do this from within the MainWP Dashboard with a simple button. < --MainWP Feature/Extension Request

I’ve noticed is once data is pulled, for example from the production site, I am required to manually log in to the staging site and re-establish the connection with MainWP. < – Issue with MainWP

This isn’t necessarily a bug since what is happening is the staging website’s existing config is simply getting overwritten with the config from the live site.

MainWP nor Cloudways just does not account for a staging/live environment where the data is occasionally overwritten on whatever site is being pushed onto.

Maybe @dennis can recommend a setting or workaround for this?

@Gadgitmatic The only way I can see getting around this is if you have two connections; one to your live site and one to the staging site; Have two separate groups in order to keep them separated in MainWP. Test your updates by pushing them to the staging site & checking if everything is ok & then using MainWP to push the updates again to the Live site; completely forgo the push to live CW feature. One or the other has to be used in your workflow.

If you’re pushing your staging to Live it shouldn’t be overriding the wp-config.php file IMO - At least that’s not how Siterground does it. @MustaasamSaleem Not trying to compare Cloudways with SG, however, it doesn’t make sense to me why CW’s script would override the wp-config.php file on a different Installation; it should only be pushing the files that were changed & or updated…? Em, I missing something?

Just to be clear, this method would require the WP Staging plugin on all the sites?

@Gadgitmatic

No not at all. You can simply make two separate Groups & continue your normal workflow on CW for creating your staging. You’re just using MainWP to Update Both & forgoing pushing the Staging site to Live.

@kwcjr I see what your saying. Your suggested workflow works great for updating and testing themes and plugins before going to production site. The caveat is any added content or setting changes will not carry over from staging to production site.

@Gadgitmatic Technically “Staging Environments” are for testing Plugins or themes only. Content is usually just handled on the Live Site where everyone has access.

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