WordPress Archives - RuslanY Blog Azure App Service Features and Best Practices Fri, 31 May 2019 19:46:15 +0000 en-US hourly 1 https://wordpress.org/?v=6.2.16 https://ruslany.net/wp-content/uploads/2019/05/cropped-web-32x32.png WordPress Archives - RuslanY Blog 32 32 Azure Web Sites – WordPress plugin update bug fixed https://ruslany.net/2013/03/azure-web-sites-wordpress-plugin-update-bug-fixed/ https://ruslany.net/2013/03/azure-web-sites-wordpress-plugin-update-bug-fixed/#comments Wed, 20 Mar 2013 18:02:06 +0000 http://ruslany.net/?p=3021 Windows Azure Web Sites has recently been upgraded to a new version. Among all the improvements and bug fixes in the new version there is one change that fixes a known issue with update of WordPress plugins. There have been numerous questions about this problem at the Azure Web Sites forum. After the service upgrade the Windows … Continue reading "Azure Web Sites – WordPress plugin update bug fixed"

The post Azure Web Sites – WordPress plugin update bug fixed appeared first on RuslanY Blog.

]]>
Windows Azure Web Sites has recently been upgraded to a new version. Among all the improvements and bug fixes in the new version there is one change that fixes a known issue with update of WordPress plugins. There have been numerous questions about this problem at the Azure Web Sites forum.

After the service upgrade the Windows Azure Web Sites now uses a newer version of WinCache – 1.3.4. This version has a fix for for the plugin update problem. I tried it and was able to update all of plugins on my site without a problem:

Plugin Upgrade Works

Other PHP related changes in this release of WAWS include newer PHP version (5.3.19) and support for UTF-8 encoding for server variables REQUEST_URI and PATH_INFO.

The post Azure Web Sites – WordPress plugin update bug fixed appeared first on RuslanY Blog.

]]>
https://ruslany.net/2013/03/azure-web-sites-wordpress-plugin-update-bug-fixed/feed/ 5
RuslanY.net running on Windows Azure Web Sites https://ruslany.net/2012/10/ruslany-net-running-on-windows-azure-web-sites/ https://ruslany.net/2012/10/ruslany-net-running-on-windows-azure-web-sites/#comments Mon, 22 Oct 2012 15:30:36 +0000 http://ruslany.net/?p=1401 I have not been writing any blog posts for a while. That was because for the past two years I have been busy working in a team that develops the Windows Azure Web Sites – a scalable web hosting platform in Windows Azure. Now that the Windows Azure Web Sites (WAWS) is publicly available I … Continue reading "RuslanY.net running on Windows Azure Web Sites"

The post RuslanY.net running on Windows Azure Web Sites appeared first on RuslanY Blog.

]]>
I have not been writing any blog posts for a while. That was because for the past two years I have been busy working in a team that develops the Windows Azure Web Sites – a scalable web hosting platform in Windows Azure.

Now that the Windows Azure Web Sites (WAWS) is publicly available I decided to try to move my site from private hosting  to Windows Azure. My site uses WordPress (with MySql database), PHP 5.3, WinCache object and user cache, URL rewriting and many WordPress plugins. With all these different technologies (many of which are not developed by Microsoft), I thought it would be a good test of how WAWS is capable of running web sites that use open source technologies. Plus I expect that my site will be more reliable and available, comparing to my previous private hosting.

I was pleasantly surprised that the migration from private hosting to WAWS hosting was relatively quick and simple. The site has been running successfully in a Shared compute mode for a while now and none of the site’s functionality has been lost or altered. In this post I’ll explain the steps I took to move my site to WAWS hosting. Hopefully it will be useful to those who are planning to migrate their WordPress based site to WAWS.

1. Signing up and creating an empty site

The sign up process is straightforward and quick. If you have not signed up before then you can get a 90-days free trial, where you can try all the WAWS hosting options for free. Once you complete the sign up process you will end up at the Windows Azure Management Portal and start creating sites. In my case I started by creating an empty free web site http://ruslany.azurewebsites.net. It takes only a few seconds to create a new site.

2. Creating a MySql database

WAWS works in partnership with ClearDb to provide MySql databases. If you have a relatively small web application with light traffic then the free MySql database provided in Windows Azure should be enough for you. You can create the database by going to the Linked Resources page  and adding a new Linked Resource:

Create MySql DB

My site’s database was bigger than 20 Mb in size, so I had to purchase the Venus Service Plan on the ClearDB site.

3. Importing data to a MySql database

WAWS provides a web management interface for SQL Azure databases. But not for MySql databases. That was not a problem however, because there is a well known web application for administering MySql – phpMyAdmin. To import the content of my blog I created a new site under my subscription (10 free sites are allowed per subscription) and installed phpMyAdmin there. phpMyAdmin provides a simple way of importing MySql content into a database:

Import Db Data

Unfortunately, phpMyAdmin is not yet available in the Windows Azure Web Application Gallery, so I had to install it manually by following the quick install guide.

Important thing to note about importing data using phpMyAdmin. Import requires uploading a sql file to the server. If the sql file is big, you may run into the PHP limit for maximum allowed size of uploaded file. It is possible to increase the limit by following instructions at Configuring PHP in Windows Azure Websites with .user.ini Files.

4. Point WordPress to new database

Once database import is complete, it is necessary to reconfigure WordPress to use new database. The configuration is stored in wp-config.php file. Change the DB_NAME, DB_USER, DB_PASSWORD, DB_HOST variables to the values provided by ClearDB.

5. Uploading the site content

There are several ways to publish content in WAWS:

  1. FTP
  2. WebDeploy
  3. Git
  4. TFS

In order to simplify publishing, I recommend to set the publishing password to something you can remember. Otherwise you’ll have to use the randomly generated password that WAWS provided for your site.

Reset Publishing Password

FTP was good enough for my needs. The FTP host name and user name are available in the site dashboard page. You can use any FTP client. Filezilla works pretty well for uploading large content.

5. Configuring custom domains

After I uploaded content I just browsed to http://ruslany.azurewebsites.com/ and the site was up and running. Obviously I did not want to use this domain for my site, so the next step was to associate http://ruslany.net/ with this site.

Free sites in WAWS are not allowed to have custom domains, so I had to upgrade my site to “Shared” compute mode.  Apart from custom domains support, there are other benefits of this mode: less restrictive usage quotas and no outgoing bandwidth limit.

Configuring custom domain is a straightforward process described in Windows Azure documentation. It is a good idea to associate both A record and the WWW CName with a site. In my case for example both http://ruslany.net and http://www.ruslany.net/ are associated with the site:

Custom Domains

Conclusion

There are a couple of minor limitations that still need to be fixed in WAWS:

  • An old version of Wincache extension is used which causes failures when upgrading plugins.
  • It would be nice to have phpMyAdmin available in the Web Application Gallery.

Other than that I am pretty happy with how my site is running in Windows Azure Web Sites so far. WAWS is capable and flexible enough to support all the custom configuration settings that my site uses.

  • Wincache object and user caches work well. They reduce load on the MySql database and make the response time faster.
  • URL rewriting is fully supported, so my site is still optimized for search engines and has pretty permalinks.
  • All the plugins work without problems.

As I find out more tips and tricks about hosting web sites in Windows Azure Web Sites I will write about them in this blog.

The post RuslanY.net running on Windows Azure Web Sites appeared first on RuslanY Blog.

]]>
https://ruslany.net/2012/10/ruslany-net-running-on-windows-azure-web-sites/feed/ 6
Install PHP applications with WebMatrix https://ruslany.net/2010/07/install-php-applications-with-webmatrix/ https://ruslany.net/2010/07/install-php-applications-with-webmatrix/#comments Fri, 09 Jul 2010 20:45:10 +0000 http://ruslany.net/?p=791 Microsoft has recently launched a beta release of a new project called WebMatrix. This is a complete web development stack that can be used to start developing and deploying web sites. One thing that may be not so obvious from all the existing announcements is the fact that WebMatrix has full support for installing, running and … Continue reading "Install PHP applications with WebMatrix"

The post Install PHP applications with WebMatrix appeared first on RuslanY Blog.

]]>
Microsoft has recently launched a beta release of a new project called WebMatrix. This is a complete web development stack that can be used to start developing and deploying web sites. One thing that may be not so obvious from all the existing announcements is the fact that WebMatrix has full support for installing, running and publishing PHP applications.

Here are the examples of how WebMatrix can be used to create and publish a PHP web site (using WordPress as a showcase).

Installing a PHP application

After installing and launching WebMatrix select “Site from Web Gallery” option and then pick WordPress:

Follow the installation steps as described in Download and Install a PHP application. As you proceed you will notice that WebMatrix downloads and installs the necessary components for running WordPress – the latest version of PHP 5.2 and MySQL. At the end of the installation process you will get a working instance of WordPress, that you can configure and customize further:

Notice the port number used in the URL. This is not the standard port 80 used by default in IIS. The site is not running on IIS that is included with operating system. Instead WebMatrix installs and uses IIS Developer Express, which is a developer-focused version of IIS that runs on all versions of Windows, starting from Windows XP. This is actually very cool because now it is possible to get the latest and greatest IIS features on Windows XP instead of using the good old IIS 5.1 as development web server :). But even if you already have Windows 7, you may still want to use IIS Developer Express, because with that you do not need to enable real IIS Web Server included with OS on your development machine.

Even though IIS Developer Express is a lightweight development server it comes with everything needed to run PHP applications, including the latest version of FastCGI module and URL Rewrite 2.0. This means that after you install WordPress with WebMatrix you can enable WordPress’ pretty permalinks by following the instructions at IIS URL Rewrite Module support in WordPress.

Note: By default WebMatrix and IIS Developer Express are not configured to run PHP even if PHP is already installed on the machine. To work this around  install any PHP application via WebMatrix UI. This way WebMatrix will configure IIS Developer Express to handle PHP requests. This is something that will be fixed in future releases of WebMatrix.

Modifying a PHP application

After the WordPress is installed there are several things you can do with it from within WebMatrix. For example you can edit the theme files by using the built-in editor:

You can check what kind of HTTP requests are made by Web Browser to load a typical WordPress page:

(Learn more about this feature at Using WebMatrix Beta: Analyze Your WebSite)

Also, you can check the WordPress database content by using the WebMatrix Database Manager:

And, finally, you can run the search engine optimization analysis and fix any SEO violations found within the application:

(Learn more about this feature at Using WebMatrix Beta: Make your Website SEO Friendly)

Publishing a PHP application

The last step is the publishing of the web application on a live web server. WebMatrix can publish the content to a web server by using various protocols: FTP, FTP/SSL and WebDeploy (note that FTP protocols cannot be used to publish MySQL database). You can pick a hosting provider from the list offered by WebMatrix or you if you know the publishing settings from your hosting provider you can manually enter them in WebMatrix.

When you publish the content the WebMatrix will show you the list of files and the database that will be uploaded to the server. Note also that during publishing the WebMatrix will replace the current database connection settings in wp-config.phpfile with the connection settings used on a hosting web server. WebMatrix will extract that information from the connection string that you specify in publishing settings:

(Learn more about publishng web sites at Using WebMatrix Beta: Publish Your WebSite)

Feedback and suggestions

The WebMatrix is a beta release and the WebMatrix team is open to any constructive feedback on how to improve the product. Do you have any suggestions or have you run into any problems when using WebMatrix? What PHP related features would you like to see in this product? Please let the team know by starting the thread on WebMatrix forum or by leaving a comment here.

The post Install PHP applications with WebMatrix appeared first on RuslanY Blog.

]]>
https://ruslany.net/2010/07/install-php-applications-with-webmatrix/feed/ 21
Make WordPress faster on IIS with WinCache 1.1 https://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/ https://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/#comments Sat, 06 Mar 2010 00:12:42 +0000 http://ruslany.net/?p=673 This post used to contain PHP code for object-cache.php file. This code has been removed because it is out of date and has bugs. Instead, the latest version of WinCache Object Cache plugin from wordpress.org should be used. This post explains how to improve performance of WordPress on Windows by using the WinCache Extension 1.1 – Beta … Continue reading "Make WordPress faster on IIS with WinCache 1.1"

The post Make WordPress faster on IIS with WinCache 1.1 appeared first on RuslanY Blog.

]]>

This post used to contain PHP code for object-cache.php file. This code has been removed because it is out of date and has bugs. Instead, the latest version of WinCache Object Cache plugin from wordpress.org should be used.

This post explains how to improve performance of WordPress on Windows by using the WinCache Extension 1.1 – Beta for PHP. You probably already know that just by enabling the WinCache extension and without any code changes it is possible to get a significant increase in WordPress performance – this is described in details in PHP on Windows: The WinCache 1.0 Benchmark. But this can be taken even further by using the user cache API’s available in WinCache 1.1 release.

To configure WordPress to use WinCache user cache API’s download the WinCache Object Cache Backend plugin, extract the object-cache.php file from it and put it in the /wp-content/ directory of your WordPress site.

That should be all you need to do. To verify that the WordPress is actually using the object cache use the WinCache Statistics Script and check the “User and Session Cache” page:

The post Make WordPress faster on IIS with WinCache 1.1 appeared first on RuslanY Blog.

]]>
https://ruslany.net/2010/03/make-wordpress-faster-on-iis-with-wincache-1-1/feed/ 31
IIS 7 URL Rewrite Module support in WordPress 2.8 https://ruslany.net/2009/05/iis-7-url-rewrite-module-support-in-wordpress-28/ https://ruslany.net/2009/05/iis-7-url-rewrite-module-support-in-wordpress-28/#comments Sat, 16 May 2009 07:41:05 +0000 http://ruslany.net/?p=393 I am pleased to let everyone know that WordPress development community has added a built-in support for IIS 7 URL Rewrite Module in the upcoming WordPress 2.8 release. Starting with version 2.8 the Permalink Settings page will allow you to easily configure “Pretty Permalinks” URL structure when WordPress is running on IIS 7 with URL Rewrite Module v1.1 installed. … Continue reading "IIS 7 URL Rewrite Module support in WordPress 2.8"

The post IIS 7 URL Rewrite Module support in WordPress 2.8 appeared first on RuslanY Blog.

]]>
I am pleased to let everyone know that WordPress development community has added a built-in support for IIS 7 URL Rewrite Module in the upcoming WordPress 2.8 release. Starting with version 2.8 the Permalink Settings page will allow you to easily configure “Pretty Permalinks” URL structure when WordPress is running on IIS 7 with URL Rewrite Module v1.1 installed.

Here is how the process of updating Permalinks structure will look like in WordPress 2.8 on IIS 7:

  1. Go to Settings –> Permalinks page and choose the permalink structure that you prefer:
    Permalink Settings page with Pretty Permalinks
  2. After clicking on “Save Changes” button the generated rewrite rule will be displayed with the instructions on how to update the web.config file manually:
    Permalink Settings Page with rewrite rule example
  3. Now you can copy the the given XML and put it into the web.config file inside of /<configuration>/<system.webServer>/<rewrite>/<rules> element and that’s it!
  4. Alternatively – instead of manually editing the web.config file you can have WordPress to update it automatically for you. To do that, temporarily grant WordPress write access to web.config file and click on “Save Changes” again. WordPress will add its rewrite rule into the proper location inside of the web.config file. Do not forget to revert the write permission on web.config file after the rule has been saved.

If you want to try this functionality, as well as all the other new features in the upcoming WordPress 2.8 release, you can download the latest nightly build. Also, pretty soon the 2.8 beta will be available.

Thanks to the WordPress development community for adding this functionality! Specifically, big thanks to peaceablewhale, Denis-de-Bernardy, hakre, sivel and ryan for directly working on the patch and contributing to it in many different ways: testing, code reviewing, cleaning up the code and checking it in.

The post IIS 7 URL Rewrite Module support in WordPress 2.8 appeared first on RuslanY Blog.

]]>
https://ruslany.net/2009/05/iis-7-url-rewrite-module-support-in-wordpress-28/feed/ 65
Update for IIS 7.0 FastCGI module https://ruslany.net/2008/08/update-for-iis-70-fastcgi-module/ https://ruslany.net/2008/08/update-for-iis-70-fastcgi-module/#comments Wed, 27 Aug 2008 02:10:36 +0000 http://ruslany.net/2008/08/update-for-iis-70-fastcgi-module/ IIS team has recently released an update for IIS 7.0 FastCGI module that fixes compatibility problems with several popular PHP applications. In particular, the update changes the behavior of FastCGI module in the following ways: REQUEST_URI server variable set by FastCGI module now includes query string and path info. Previously, lack of the query string … Continue reading "Update for IIS 7.0 FastCGI module"

The post Update for IIS 7.0 FastCGI module appeared first on RuslanY Blog.

]]>
IIS team has recently released an update for IIS 7.0 FastCGI module that fixes compatibility problems with several popular PHP applications. In particular, the update changes the behavior of FastCGI module in the following ways:

  1. REQUEST_URI server variable set by FastCGI module now includes query string and path info. Previously, lack of the query string in this server variable caused the popular CMS application Drupal to not work with FastCGI on IIS 7.0
  2. REQUEST_URI server variable now contains the originally requested URL path before any URL rewriting was performed. Prior to this fix, the server variable used to contain a final rewritten URL, which caused problems when using URL rewriting to enable “pretty permalinks” for popular blog engine WordPress.

Note that above mentioned problems do not exist in IIS 6.0 FastCGI Extension, which always has been setting the REQUEST_URI server variable correctly.

The update is available for download from the following locations:

Warning: if your PHP application was coded in a way so that it relied on the REQUEST_URI server variable to contain the requested URL without a query string or to contain the final rewritten URL, then installing this update may break your application. Before applying the update, please make sure that your application does not rely on incorrect behavior of FastCGI module.

Acknowledgements: I want to thank IIS team members (Anil Ruia, Won Yoo, Yamini Jagadeesan) for providing this update and Zend Technologies team (Stanislav Malyshev) for validating the changes in FastCGI module.

The post Update for IIS 7.0 FastCGI module appeared first on RuslanY Blog.

]]>
https://ruslany.net/2008/08/update-for-iis-70-fastcgi-module/feed/ 20