Akira's Custom Tattoos is up and running following the last lesson where we learned how to install WordPress on Azure. It's really plain and lacks some functionality at the moment. Luckily for Akira, the WordPress framework makes it incredibly easy to make her site do things that are useful.
This post is part one of the Installing WordPress Plugins series. Before we can install plugins, we need to learn what Wordpress plugins are and make some changes to our Azure Web App PHP settings so we can install the really good plugins. That's where part one ends and then part two will show you the actual WordPress plugin installation process. Part three will give you the list of the best WordPress plugins that you'll want to install to produce a successful website based on a VPA foundation.
What is a WordPress Plugin?
When the WordPress folks built WordPress, they built it so that other developers could extend its functionality with plugins. Most people are familiar with apps and you can think of plugins in the same way. Like an app makes your phone do something - play a game, edit a document, take a note, etc... - WordPress plugins make your website do something other than what comes with the basic installation.
There are a few plugins that you're going to want to use as you move forward with building your website. They not only handle some of the tasks - like collecting analytics data that you'll use to improve your site over time, but they also make it easier to manage your site, add content to it, make it faster, and so on...
While you could already go ahead and install most plugins, there are some that are larger you're going to want to use that are larger in size and use a bit more computing power (memory). So, to make them run without issue, we first need to change some php settings for your Azure web app so WordPress stays happy.
Don't worry - it's far simpler than it sounds. Just follow the step-by-step guide below or follow along with the video at the top of the page.
Changing PHP ini settings for WordPress and Azure
Now just before we get to installing the wordpress plugins, we need to adjust some settings in the Azure portal. The default installation of WordPress on Azure has some PHP settings that prevent certain sizes of uploads to the site, memory limits and so on. If these settings aren't set high enough, you'll run into problems installing plugins - especially some of the larger ones out there.
- Log into your Azure Portal
- Click on All Resources then click on the App Service for the site you are creating (I click on akiracustomtattoos), then scroll down to the development tools section and click on Advanced Tools. Your screen should now look like this:
- Click on Go. When you do a new tab/page is going to open in your browser giving you access to the Kudu tools. The Kudu console is a debugging service on Azure that gives you access to explore your Web App settings. You can learn more about Kudu here, but really, after making the change you're about to make, you won't be back here much. When the page loads, click on site extensions on the top. We're going to install an extension that gives you access to make a change to your PHP settings.
- The page that loads has two tabs on it - installed showing the site extensions you have installed (which is empty because you haven't installed anything yet) and Gallery which gives you a bunch of extensions to choose from. You're going to search for and install the PHP Manager extension. So, in order:
- 1 - Click on Gallery
- 2 - Enter PHP in the search box and click search
- 3 - Click on the + symbol. A popup will come up with some terms to agree to - click the install button which will start the installation. Once done, another popup on top right will prompt you to click the restart site button.
- After clicking the restart site button, it will change to a loading indicator and then eventually turn back into the restart site button. At that point, you'll click on the Installed Tab (next to the gallery tab) to see that the PHP Manager is now listed as an installed extension. You'll notice it has a play (launch) button. Click that to start it up.
- Another tab or page will open showing you the PHP Manager. it gives you some information about the version of PHP running, where your settings files are and other things you do not really need to think about. All you'll want to do here, is click on PHP Settings on top right of the page.
- Don't let the page that loads with all your Azure Web App PHP settings intimidate or overwhelm you. We just need to make a couple adjustments to make WordPress run a bit better on Azure, then we'll get out of here for good. Scroll down the list of settings a little ways until you see memory limit, post max size, and upload max filesize. Change the numbers to the following being sure to hit save after each one.
- 1 - Memory Limit - tells Azure how much RAM your WordPress application can use. If you're installing larger plugins or have a lot of functionality on your site - you'll need to increase this. We're going to set it from its default of 128M to 1024M (1024M = 1GB of RAM). It doesn't always use this much memory - just lets WordPress use up to this limit.
- 2 - Post Max Size - We're going to change from default to 1024M - same as Memory Limit. Just says how much data WordPress can post at one time.
- 3 - Upload Max File Size - tells WordPress how big the files can be. Change from default to 1024M. You shouldn't encounter any plugins larger than 1GB, but depending on what your site is going to be about you may have to raise this even higher. For example, if you are going to setup some kind of video sharing site and your video files are larger than 1GB, you'll need to raise both the previous setting (Post Max Size) and this Upload Max File Size to be large enough to handle the files you want to upload.
- The last thing you'll need to do is restart your Web App so the new PHP limits take effect. To do that, you can close the PHP Manager and Kudu Advanced tools windows and go back to your Azure portal. Click on your web app, overview and then restart. It will take a couple seconds and you'll be good to go.
In Summary - Azure PHP Settings for WordPress
In this short lesson, we learned what a WordPress plugin is, accessed the advanced developer tools for our Web App in Azure, installed a site extension (PHP Manager) and changed some PHP initialization settings so that WordPress can handle installation of some of the bigger, more feature rich WordPress plugins available.
Congratulations for making it through that "technical" stuff. Next up in Part Two of the Installing WordPress Plugins series of posts, you'll learn how to install an actual WordPress plugin and configure it to do something on your site. You're making awesome progress. Keep up the consistent progress.