WordPress on AWS EC2 – part 7

What else need your WordPress?

WordPress use some additional modules for Apache and PHP. Unfortunately I haven’t found many information about what is actually needed and for what purpose. There are some articles on this subject, but they’re quite old. In this section I’ll show you couple of WordPress features which don’t work in our environment and how to fix it.

Pretty URLs

So let’s begin with turning on preety URLs. This feature help us make our URLs more readable and SEO friendly. In our WordPress Dashboard find tab Settings->Permalinks. There let’s choose one of option we like and save settings. Let’s go back to home page and try to click on post title. Whoops…

In this case the problem is disabled rewrite module in Apache. Let’s enable it:

Much better now. 🙂

ec2_wordpress_permalinks2

wp_mail

In previous part I wrote that our WordPress can’t send emails and I suggest installing plugin which allows us send messages through SMTP. Let’s install it then from dashboard. We can of course do it also using WP-CLI or upload files manually. Before we proceed to plugin installation, let’s install first another PHP module. It’s not necessary now because WordPress can work without it, but some plugins could not.

Okay, now we can install Easy WP SMTP (or any other with similar functionality). Configuration is very straightforward – just like configuration any e-mail client like Outlook or Thunderbird.

ec2_smtp

This plugin have feature which help us examine if everything is correct by sending test email. If you’re using another plugin which doesn’t have this kind of functionality you can for example change password for your user. WordPress should automatically send e-mail with information about password change to e-mail address attached to your account.

Images scaling and cropping

When we upload image to our WordPress media library, they are automatically processed and we can use different image sizes in our posts. Additionally we can use built-in image editor which help us crop image for example. So at least it should work that way but now if we try to put image into post we can use only full image size.

ec2_wordpress_image_size

This is because we don’t have PHP module called imagick. Let’s install it then. We’ll also install module called GD. In fact for WordPress itself imagick is sufficient, but some plugins could use GD for image manipulation.

Now if you upload new image it should be possible to use different image sizes and built-in image editor.

ec_wordpress_image_size2

Additional modules

Some plugins are using module called mcrypt so we can install it by the way:

This set of extensions should be sufficient in most cases.

So we actually done. In last part I’ll summarize everything what we’ve done and make some additional comments.

Part 1
Part 2
Part 3
Part 4
Part 5
Part 6
Part 8

Leave a Reply

Your email address will not be published. Required fields are marked *