Migrate a PHP-MySQL backend to App Platform

I currently have a PHP backend that uses a MySQL database hosted on a droplet (a VPS). Now I want to migrate it to App Platform to relieve ourselves from maintaining the VPS. Is there a guidance document about this issue? How to get help about this?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there @mehdiberrebouh,

What I would personally do in this case is:

  • Spin up a Managed Database cluster
  • Export your database from your Droplet and import it to the Managed cluster.
  • Then update your connection string to point to the new Managed database cluster so that your application would use it instead of the local MySQL server.
  • With that you would have half of the work is actually done, the next step would be to link your GitHub repository with the App platform, add the necessary environment variables like the details for the managed database cluster and then deploy the application

You can follow the steps on how to deploy a PHP application to the app platform here:

  • Once you are done with the deployment, you can test the application fully and when you are sure that everything is working as expected, then you could point your domain to the App platform.

Hope that this helps. Regards, Bobby