Migrate Wordpress (as Discourse SSO provider) from Siteground to Lightsail

We’re maxing out some limits on our managed Wordpress hosting, with Siteground, and want to move our WP installation to Amazon Lightsail.

Here’s a couple of points about our current setup:

We’d like to move our WP instance from Siteground to Lightsail and it doesn’t seem like that, alone, should be too difficult.

Our main concerns are about breaking our connection between Wordpress and Discourse, and the implications of moving our WP instance to AWS Lightsail.

What considerations should we be concerned about?

What would the process be to maintain our connection between Discourse and WP users, etc?

Any advice here would be greatly appreciated! :pray:

The main thing to be aware of with SSO is that the WP Discourse plugin sets the WordPress user’s ID as the SSO external_id on Discourse. What this means is that users are linked between WordPress and Discourse by their WordPress user ID. If you perform a full database migration to your new WordPress server, I would not expect WordPress user IDs to be changed, but it would be worth making sure that is the case.

If, for any reason, WordPress user IDs are altered as a part of the migration process, you will need to delete all existing SingleSignOn records from your Discourse site. This can be done from the site’s Rails console. After having deleted the SSO records, WordPress users will be matched to Discourse users by their email address the first time they login from WordPress to Discourse on the new server.

If you have to delete the SSO records, one thing that can cause issues is if your existing WordPress user’s email addresses have not been marked as valid by the WP Discourse plugin. If that is the case, some extra steps will need to be taken to allow existing users to be matched by their email address. I can provide details about how to do that if needed.


Thank you so much for the prompt and thorough response @Simon_Cossar!! After I posted I kept saying to myself… "I sure hope that Simon sees this post! :stuck_out_tongue: I always appreciate your Wordpress insight and expertise.

I will report back on how things go, and maybe with an additional question or two.

1 Like

I watch all topics in the #support:wordpress category. If you post in that category I’m sure to see it.