How To Transfer WordPress Files From Localhost To Azure: Step by Step Guide 2019
I have completed my WordPress site in localhost, and I have WordPress domain in Azure (default WordPress theme). Now I want to transfer complete all files to azure from localhost. Is it possible? Please help me. Create a backup of your WordPress Development files and database first. To install WordPress on Azure, kindly follow the steps listed in this guide: • PART 1: Install and Configure WordPress in Azure • PART 2: Import Content • PART 3: Permalinks
1. How to Install and Configure WordPress in Azure To add a WordPress install to Azure, the first thing you have to do is to choose a free database which can be done by selecting the “New” link at the bottom of the page, then click on “Store” and select “ClearDB” MySQL database from the available list.
Click the next arrow and choose the free option and the database will be added to your account. Once the database has been added which takes a couple of minutes, you can then add a WordPress website. This process is completed within the Azure gallery framework, which has a couple of apps for you to choose from. Once again at the bottom click the “New” link > “Compute” > “Website” and then “From Gallery” which loads up the available apps.
There are several different categories an array of applications to pick from, ranging from Drupal, .NET CMS, Better CMS, Django, Ghost, Joomla!, MVC Forum, to WordPress. Select WordPress from the available options listed (the WordPress option is categorized under the CMS section) and click the next arrow.
Next, you type in the URL of your website and pick the particular database you have previously created. (if you would like, it is possible to create another database), if you have authentication keys for the selected database, enter them into the specified space. Finish off here and you will see the website is created, once it’s finished you can click on the name of your site and will be presented with your dashboard.
Visit the URL of the site you created which will be on an azurewebsites.net sub-domain and you will see the familiar WordPress setup screen where you can create your admin account, enter your email and so on. Enter those and you will now have a functioning WordPress installation.
Now that you have successfully installed WordPress on Azure, You need the /wp-content folder, the folder contains theme files, plugin files, and uploads which contains media files uploaded to your WordPress website. You also need the export file from WordPress on your localhost, you will need a copy of your site content, the export file contains the user accounts and other contents like pages, posts, menus, etc.
To export your files at this stage, simply make use of WordPress’ in-built exporter.– all you have to do is navigate to “Tools” > “Export” and choose “All Content” and download the Export file Login to Azure portal and choose your website from the “Websites” link on the left-hand side, click your site name and the “Dashboard” and you will see a link on the bottom right named “Setup Deployment Credentials”
Upload Content Via FTP Enter a username and password in the popup box and these will be your FTP login credentials Scroll down and you will see the FTP hostname to use, For example, if I entered my username as “jay” but when logging in via FTP I have to enter it as follows: jay\jay along with the password you chose – you can then login with any FTP program such as Filezilla, navigate to site/wwwroot/ and you can then upload your wp-content folder. 2. Import Content To import your new content into your Azure installation, navigate to “Tools” > “Import” and choose the WordPress importer from the list:
This will bring up the WordPress importer plugin, click “Install” and then activate the plugin
You can then upload the XML file you exported from your original site:
Make sure you tick the “Download and import file attachments� box as this will grab all the images from your old site. Once this has finished, you can now activate your original theme and plugins and you should have a complete copy of your old site running in Microsoft Azure.
3. Permalinks To ensure there is no 404 page not found errors, ensure that you configure the permalinks so that they are similar to the previous website. To do this, navigate to “Settings” > “Permalinks” and select your preferred option from the available options. For example, select“Post Name” and WordPress will set up a “web.config” file for you (on PHP hosting, the file is .htaccess ) and it will contain the following : [php]<?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <rewrite> <rules> <rule name=”wordpress” patternSyntax=”Wildcard”> <match url=”*”/> <conditions> <add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true”/> <add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true”/> </conditions> <action type=”Rewrite” url=”index.php”/> </rule></rules> </rewrite> </system.webServer> </configuration>[/php] If you follow the steps listed above, you would notice that the entire process of moving a WordPress installation to a new hosting platform is fairly easy and direct – creating a complete website backup is recommended so as to avoid loss of data if you hit any snag at any point during this process. The in-built WordPress Import/Export tool is very handy for this process and FTP simplifies the whole Azure interface setup process.