Migrating from MariaDB to MySQL (or vice versa) requires deploying a new server with your desired database system (MySQL or MariaDB), and subsequently cloning your web application from the current server to the newly deployed server, performing tests, and then updating your DNS records as required.
Note: Direct, in-place conversions on an existing server are not supported, nor recommended as a best practice for web applications in production environments.
#1 – Deploy a Server With the Database Type You Wish to Switch Your Web Application(s) to
Start by connecting a new server to your RunCloud account by clicking Connect a New Server – as shown below:

Proceed to select your preferred Server Provider and Provision Type.

Finally, make sure to select the Database Type to which you’re looking to migrate your web application(s).
For example, if you want to migrate MariaDB web applications to MySQL, you should set up a new server that runs on MySQL.

#2 – In the Meantime, Prepare for Your Migration
While waiting for the server running your desired database type to connect, prepare for the migration just as you would for any other:
- Back Up Your Web Application: Create a full backup of your existing web application within RunCloud. This is your safety net in case anything goes wrong. Go to your web application, then Backup, and click Create Backup Now, and choose Full Backup.
- Plan Downtime: Migrations will require some downtime. Schedule the migration during a period of low website traffic to minimize disruption.
- Resource Considerations: Ensure your new server has sufficient resources (CPU, RAM, storage) to handle your web application.
- Take note of your current PHP version. Make sure that you use the same PHP version on your target server or at least an application-compatible PHP version.
#3 – Migrate Your Web Application
Once you’ve completed all the migration preparation steps outlined in step #2, your server should be connected and ready to go.
To clone your web application, navigate to the one you want to migrate (currently using the old database system).

From the web application overview page, initiate the Cloning process. This can be done in the two areas highlighted below:

Set your Destination Server as the server deployed in step #1 (the one with the database system you want to switch to).
Then adjust any of the other settings to suit your setup, and once ready to start cloning, you can proceed by clicking the Clone button in the bottom right-hand corner of the screen:

#4 – Testing
After the cloning is complete, access your web application on the new server using its new URL. You can also use the temporary URL provided by RunCloud to test your new site before you make it live. In this stage, you should test all aspects of your website:
- Functionality: Ensure all features, forms, and interactive elements work correctly.
- Database Connections: Verify that your application is properly connected to the new database.
- Performance: Check loading times and overall responsiveness.
- Plugins/Themes: If you’re using WordPress, ensure all plugins and themes are compatible with the new database system.
#5 – Update Your DNS Records to Point to the New Web Application (If Necessary)
Once you’ve thoroughly tested your application and are confident it’s working correctly, update your domain’s DNS records to point to the new server’s IP address. This will direct visitors to the new server.
Locate Your New Server’s IP Address: Find the IP address of your new server in the RunCloud dashboard.

Update Your DNS Records: Log in to your domain registrar or DNS provider (e.g., GoDaddy, Cloudflare, etc.) and update the A record (and AAAA record for IPv6, if applicable) to point to the new IP address.
Propagation Time: DNS changes can take some time to propagate across the internet (usually a few minutes to several hours). Be patient during this process.
#6 – Monitoring
After the migration, monitor your website’s performance and stability closely. RunCloud’s monitoring tools can help you track resource usage, error logs, and other key metrics.
If you have any other questions or need help – please feel free to get in touch with our 24/7 support team. We’re here to help!