I have created Joomla site to my own computer and now I'm transferring it to Azure.
I started by creating a completely new Joomla and then copying all the files to the server.
Now the next task is to copy databases which are now located in my local server to Azure. Can anyone help me with this?
I've never migrated a Joomla site but I've done a number of WordPress and Drupal sites. If Joomla or your site itself contains location specific data in its database (i.e. site url, non-relative paths to images, etc.) then you'll need to modify those once you import your database, otherwise these steps should work as is.
- Grab the connection string for the MySQL database in the existing Joomla site you provisioned from the App Gallery in Azure. You can get those in the Azure management portal, click on your new website, then configure tab, scroll down to connection strings, select "show connection strings" and copy them into the configuration.php file in Joomla you wish to migrate. Your config file should look something like this when you're done.
/* Database Settings */
public $dbtype = 'mysql';
public $host = 'us-cdbr-azure-west-a.cloudapp.net';
public $user = 'b62be654e222v6';
public $password = '1f569fa9';
public $db = 'myjoomladb';
public $dbprefix = 'jos_';
Next install the PHPMyAdmin site extension to your new Joomla site. To do this type this into your browser. http://myjoomlasite.scm.azurewebsites.net where myjoomlasite is the name of your new joomla site. From the top right menu select Site Extensions, click on Gallery, select phpMyAdmin, click the plus button, then click the "restart site" button that appears after it installs. Next click the chevron button to launch the extension.
Next run mysql backup and backup your database to a sql file. Make sure to select the Drop table option when you do this because you run Import you will want to drop and then recreate every table. Take the .sql file and go back to phpMyAdmin and import the database.
Finally deploy your site. You can do this two ways. FTP or you can push it from a git repo. If you use FTP then get the FTP info from your site's dashboard in the Azure Management Portal, connect to it using your FTP client and copy the files over. If you want to do a git push then click the "publish from source control" link from the site's dashboard and follow the steps on your local machine to add the git remote, then add/push the files to Azure.
Hope this helps.
Edits for comment below.
For the dbprefix just leave it unchanged. That parameter is used when you have multiple joomla sites using the same database.
There are two ways to do the backup. Use phpMyAdmin to connect to the database and backup, then use FTP to download the file.
If you are running linux or mac this would be the command line option,
mysqldump --opt --no-create-db --protocol=TCP --user=${USER} --password=${PASS} --host=${DBSERVER} ${DATABASE} > ${FILE} | gzip > ${FILE}.sql.gz