0

I would like to migrate a self-hosted wordpress site to Microsoft Azure. I've already done this migration job with Duplicator plugin from a server to another and everything worked well.

The problem with Ms Azure is that it uses a service called ClearDB to manage databases. (feel free to correct me if it's wrong) When you create a free account with this service you will get a restricted plan called Mercury which allows you to query your db (max dimension of 20MB) up to 3600 queries/hour. But the migration process requires several operations on the database and the

As written in this blog the only option is to upgrade your plan to the 10$/month subscription.

I've found another way but the plugin the author uses in this link does not work for me.

Should I use another plugin to backup my WP content? Do you have any advice?

Thanks

UserK
  • 884
  • 3
  • 17
  • 40
  • Unless you have a compelling reason to run on Azure (i.e. you have Azure credits you want to use or your blog has customisations that you want to keep) then I'd perhaps recommend you just run your WP site on WP.com (however controversial that may be here). – Simon W Aug 24 '14 at 13:28
  • If this is the only way to migrate to Azure, I prefer running the website on my own server for free. – UserK Aug 24 '14 at 16:18
  • Wordpress offers a free tier. Probably not as flexible but at the right price point. See the discussions on this page that covers your scenario: http://azure.microsoft.com/en-us/documentation/articles/web-sites-php-web-site-gallery/ – Simon W Aug 24 '14 at 23:18
  • In the discussion they say that Ms "Couldn't solve that problem" and that they were unaware of anything specific about Azure... It seems to be that there aren't other ways – UserK Aug 25 '14 at 01:47
  • I opened a ticket. I'll post the solution soon, I hope – UserK Sep 04 '14 at 11:40

1 Answers1

1

There are three solutions. I chose the first one.

  • Configure Mysql on a virtual machine and install Wordpress (classic way)

This can be done installing an already configured image with the Lamp packages on your Virtual Machine. Please see this link

If you want to set up it manually, follow these steps:

Create the vm (I used Ubuntu 14.04) then connect via SSH to your server.

ssh root@server_ip_address

Install Apache

sudo apt-get update
sudo apt-get install apache2

To check if Apache is installed, direct your browser to your server’s IP address. The page should display the words “It works!"

Install MySQL

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

During the installation, MySQL will ask you to set a root password. Once you have installed MySQL activate it with this command:

sudo mysql_install_db

Finish up by running the MySQL set up script:

sudo /usr/bin/mysql_secure_installation

The prompt will ask you for your current root password.

Install PHP

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

PHP also has a variety of useful libraries and modules that you can add onto your virtual machine. You can see the libraries that are available.

apt-cache search php5-

Decide which module you wish to install and type:

sudo apt-get install name_of_the_module

Although LAMP is installed, we can still take a look and see the components online by creating a quick php info page. Create a new file:

sudo nano /var/www/info.php

Add in the following line. Save and exit

<?php
phpinfo();
?>

Finally restart apache

sudo service apache2 restart

and check the info page typing in your url

server_ip_address/info.php

  • Install mysql in a VM and create an Azure Website with a Wordpress image. Then link the mysql db on the virtual machine to the Wordpress site.

  • Upgrade ClearDB plan to the 10$/month subscription and specify the url of your remote db in wp-config.php

UserK
  • 884
  • 3
  • 17
  • 40
  • 1
    I've tried option two (install mysql in a VM and create an Azure Website with a Wordpress image. Then link the mysql db on the virtual machine to the Wordpress site.) and found the networking to be very slow and unusable. A VM with a local MySQL Db seems the best way. – Rexxo Apr 08 '15 at 10:45