Click to hear post!

When you install a Caching Plugin, say WP Super Cache in our case, for the first time on WordPress Blog hosted on Amazon Web Services (AWS) you get an error & the plugin is not completely installed. Reading the error one can understand it is something to do with File permissions for the WP-Content folder, a key ingredient of WordPress Blog.

This would be a nightmare for any newbie to WordPress. But as I have 10 years of experience in Digital Marketing, I took it lightly & searched for exact error messages in Google & I was happy to know because it involved working with SSH. My viewers might be knowing I have a passion for playing with new technologies & I had installed APC module in Dreamhost Shared Hosting, way back in 2013 or so. Am I deviating? Let’s get started!

As said above there is another way to change File Permissions through FTP access. But even this won’t work & the FTP software closes even after repeated attempts; the same was in my case. This happens because I used a free Wodpress certified by Bitnami & here you as a user don’t have access to the WP-Content folder.

So, for connecting your instance through SSH you need to download the “Secret Key” which can be only done during WordPress installation & AWS won’t provide “Secret Key” later. If you want the “Secret Key” later, the only way will be WordPress re-installation on your instance. Secret Key is in ‘.pem’ format & the UI while downloading Secret Key looks as shown in the image below.

Secret Key UI - AWS
Secret Key UI – AWS

If you have plans of re-installing WordPress in this case take a backup of your blog. I usually save my backups directly to Dropbox using Updraft Plus.

A Video Guide

Downloading & Configuring Putty Software

Putty is a telent (unsecure) or SSH (secure) client or Windows software for connecting to your instance/server remotely. It has a GUI interface. It can be downloaded from here, by selecting your version (x64 or x86) that is, (32-bit or 64-bit) as per your system configuration from Package files.

Installing it is an easy process like installing any other software on Windows. Putty comes with “Puttygen”, using which we convert ‘.pem’ file format to ‘.ppk’ (Protected by Message Authentication Code). For more info, refer above video.

Now, open Putty Software. Paste the IP Address of your instance/server. This can be got from the ‘Running Instance’ page. In my case, I am using EC2 instance & I could get it by clicking EC2 in the Management Console of AWS. It may vary as per the instance. Give a name to your session & click save. For more info, refer above video.

Now, you need to fill in certain details to configure further. From categories in the left panel select “Auth”, “Data” & “Tunnels”; each has its own setting that needs to be done, as shown below. For more info, refer above video.

Configuring Putty
Configuring Putty
  • Auth: Browse & select your previously converted ‘.ppk’ file.

  • Data: Fill in the username; as this WordPress is built by Bitnami. Here, the username they kept is “bitnami”. Username could be anything!

  • Tunnels: This creates a tunnel of communication between your instance & localhost/computer.

Fill in these two details

Destination/EC2: localhost: 80

Source Port/Our Post: 888

From ‘Sessions’ click save

Click Open & you will get access to your instance via SSH

For more info, refer above video.

Keep this aside or minimize the SSH (GUI) window & login to your WordPress Blog. From left panel, select plugins. Then. Click “Add New” & type “WP Super Cache”. Install the plugin & activate it. If this is your first time without changing file permissions then you will get an error. For more info, refer above video.

File Permissions & commands to execute

You might have seen the video by now. I am not executing commands myself since it’s just a one-time issue & it got resolved. But, I will give you some commands to change file permissions & then revert back changes. These commands need to run in the GUI interface/SSH.

Giving Writable Permissions to WP-Config file which is in WP-Content folder.

sudo chmod 660 /opt/bitnami/apps/wordpress/htdocs/wp-config.php

Now, just refresh the WordPress dashboard & the error will go as the Plugin got the necessary file permissions to get completely installed. Next, run the following command (same in SSH).

sudo chmod 640 /opt/bitnami/apps/wordpress/htdocs/wp-config.php

This command reverts back the file permissions, which is important for security reasons. If you are interested, you can read more about Permission Modes, here.

EVEN AFTER THIS IF THE ISSUE IS NOT RESOLVED, COMMENT TO ME & WILL SURELY HELP YOU. THANK YOU.