PHP on Windows Azure Getting Started Parenting series (3)-Deploying WordPress in Windows Azure

Source: Internet
Author: User
Tags windows azure sdk install wordpress azure sdk
PHP on Windows Azure Getting Started Tutorial series (3)-Deploy WordPress in Windows Azure

PHP on Windows Azure Getting Started Tutorial series (3)-Deploy WordPress in Windows Azure
July 28, 2010
   some articles because of blog compatibility issues , it can affect the reading experience . If this is the case, please visit Original Blog .
This article is the third article of the PHP on Windows Azure Getting Started Tutorial series. In the previous article, we have successfully run a PHP application in Windows Azure and combine the use of SQL Azure. This article explains how to deploy WordPress to Windows Azure. Readers are asked to read this tutorial series sequentially, as this article will use the project created in the previous article.
Code: 1. Click here to download the wordpress package. WordPress uses MySQL as its database by default. And the WordPress package we downloaded was rewritten by the http://wordpress.visitmix.com/website. Unzip it to Php_webcgirole) (please refer to the first article) under the project directory, such as:
  
2. Rename the wp-config-sample.php file to a wp-config.php file (the file is a WordPress profile) and open and fill in the database connection information (refer to the second article in this tutorial), such as:
  
Note Change Db_type to sqlsrv to connect to the SQL Azure database. 3. Open wp-settings.php, find 147 lines, comment out the following statement:
if (!extension_loaded (' MySQL ') &&!file_exists (Wp_content_dir. '/db.php ') die (/*wp_i18n_old_mysql*/' Your PHP installation appears-be-missing the MYSQL extension which is required by WordPress. ' /*/wp_i18n_old_mysql*/); 4. Open the Wp-admin directory under setup-config.php, find 57 lines, comment out the following statement:
if (!extension_loaded (' MySQL ') &&!file_exists (Abspath. ' wp-content/db.php ') Wp_die (/*wp_i18n_old_mysql*/' Your PHP installation appears to be missing the MYSQL extension which is required by WordPress. ' /*/wp_i18n_old_mysql*/); We said that WordPress default to MySQL as a database, so WordPress will check whether PHP is added to the Php_mysql.dll module. (Of course you can also remove the php.ini file; Extension=php_mysql.dll comments to load the MySQL module.) ) 5. Open Web. config and add the following configuration to the tag. (The display mode of the error message is verbose, adding support for URL rewriting)
6. So far, our program has been able to deploy to Windows Azure. But here we first add the functionality of using Windows Azure storage to WordPress. 7. First, download the Windows Azure Storage for WordPress plugin from here. And here, download to Windows Azure SDK for PHP v1.0.1.
8. After the plug-in decompression into the wp-content under the plugins directory. After extracting the SDK, add the Microsoft folder under the library to the Php_webcgirole project directory. Such as:
  
9. Find in php.ini; Extension=php_curl.dll, remove its semicolon, remove the comment. Because the plug-in will use curl
Module. 10. Refer to the second article to deploy the project to Windows Azure. Open the deployed Web site via the URL, as
  
11. Enter your blog name and email address and click Install Wordpress to set up your blog. and follow the follow-up instructions to proceed.
12. In the Background Control Panel, click the Installed tab under Plugins, on the right we will see the Windows Azure Storage for Wordpress plugin, click Activate to activate it. Such as:
  
13. After activation, under Settings, click the Windows Azure tab to enter the plugin's settings screen. We see that we need to fill out the store account name and primary Access Key, and select the default storage Container.
We will first fill in the store account name and primary Access Key and click Save Changes. After re-refreshing the page, we can see the default Storage container the optional container is listed in the drop-down menu, select one and then click Save Changes.
  
Store account name and primary access key can be found in Windows Azure portal such as: (Small red box for store account Name, red box for primary Access key)
  
14. Then, when we write articles in WordPress, we can insert multimedia files stored in Windows Azure Storage, such as:
  
Well, so far, we've deployed WordPress to the Windows Azure hosted service, which uses SQL Azure, and the storage of multimedia files uses Windows Azure Storage.
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.