Import of Wordpress database only works in replica mode #352
Replies: 2 comments 4 replies
-
Hello @joshourisman, That does sound odd! Based on what you shared, if you are already pointing to the PlanetScale database and using our hostname and credentials while in Replica Mode and everything is working normally within WordPress, then the switch to Primary Mode should be pretty painless, since you're essentially already using PlanetScale for all of your reads while in Replica Mode as you shared. This would probably be one that we would want to dig into a little further with you so when you have an opportunity, please share the organization and database name, along with some screenshots of what you've described above, and share them with us over at https://support.planetscale.com/ that way we can work with you more closely to understand what might be happening. |
Beta Was this translation helpful? Give feedback.
-
@joshourisman No need, I have found your database. I'm fairly certain this is because you have promoted this branch to production effectively disabling any direct DDL operations on this branch. Wordpress, however, needs to be able to perform those, e.g. on upgrades and plugin installations. I suspect, Wordpress runs some checks to see if it has everything it needs, and otherwise renders the setup routine. I have demoted the branch back to development. I would appreciate if you could give this another try to see if that was it. More broadly, hosting a Wordpress database on PlanetScale means that you will not be able to use production branches, but only development branches. Those, however, come with fewer resources, they're not getting backed up automatically every 24 hours, and are also not write-protected from schema changes. I'm no Wordpress expert, but I imagine, for Wordpress to function properly with a database hosted on PlanetScale, you would need to write a plugin or otherwise customize your installation so that schema updates get decoupled from the rest and that Wordpress would give up on its requirement to execute direct DDL operations. None of that is straight-forward nor feasible, I'm afraid. The gist is that I can only recommend to host your Wordpress blog on PlanetScale for development or testing purposes at this time, but not for a production blog unless it's behind a CDN or some other cache, and even then you may encounter issues as traffic ramps up on your blog. |
Beta Was this translation helpful? Give feedback.
-
I'm attempting to import a Wordpress database from Google Cloud SQL to PlanetScale. Overall the import process seems to work great, and if I point a Wordpress container at the PlanetScale database while it's in replica mode everything behaves exactly as you'd expect, and I can view the site as normal, including the admin. However when I then switch the PlanetScale database to primary mode, the Wordpress site gives me the installation screen instead of the existing blog. If I switch it back to replica mode, it goes back to working as expected.
If I'm understanding the import process correctly, the main difference between replica and primary mode is that writes will be routed to the external database and synced to PlanetScale in replica mode, and the opposite in primary mode. I'm at a bit of a loss as to how that would cause this issue, but I am also not a Wordpress expert, and inherited support of this site…
Beta Was this translation helpful? Give feedback.
All reactions