Categories: DevOpsWordPress

How to Fix AWS LightSail WordPress File permissions

Recently I moved my website from CPanel hosting to Lightsail hosting. As everyone know lightsail is cheaper than EC2 also its provide control of your own server. It is a VPS server but in package provided by AWS.

I successfully transfer the WordPress site from CPanle to Lightsail. But when I tried to update or upgrade my WordPress version or Plugins I got the permission issue. Somthing like “could not create directory”.

AWS Lightsail Permission Fix Steps

1 ) First you have to check your bitnami folder structure. This different than others. You can check this using FTP or you can connect the SSH and check.

2) For connect FTP or SSH you need to login lightsail account and select your instance. Once you select your instance you can go and click orange “Connect using ssh“.

image

3) In my scenario my folder structure is : /opt/bitnami/wordpress/

When you have the Terminal window open, you can run following command as per your path

Permission Command One

sudo chown -R bitnami:daemon /bitnami/wordpress/
sudo find /bitnami/wordpress/ -type d -exec chmod 775 {} \;
sudo find /bitnami/wordpress/ -type f -exec chmod 664 {} \;
sudo chmod 640 /opt/bitnami/wordpress/wp-config.php

Permission Command Two

sudo chown -R bitnami:daemon /opt/bitnami/wordpress/
sudo find /opt/bitnami/wordpress/ -type d -exec chmod 775 {} \;
sudo find /opt/bitnami/wordpress/ -type f -exec chmod 664 {} \;
sudo chmod 640 /opt/bitnami/wordpress/wp-config.php

Related articles

WordPress Tips And Tricks For Beginners

How To Secure Your Contact Form 7 With ReCaptcha V2

Understand The Background Of Free AI Tool Now

Best Autoptimize Settings For WordPress Plugin In 2022

How To Use Header Tags For Your WordPress Site

Developer Diary

Share
Published by
Developer Diary
Tags: Tips

Recent Posts

Git Tag Cheat Sheet

Introduction Git tags are an essential feature of version control systems, offering a simple way…

4 months ago

Understanding Web Storage: Cookies, Local Storage

Introduction The methods that browsers employ to store data on a user's device are referred…

4 months ago

Setting up OpenVPN Access Server in Amazon VPC – AWS

Introduction A well-known open-source VPN technology, OpenVPN provides strong protection for both people and businesses.…

4 months ago

Enhance Error Tracking & Monitoring: Integrate Sentry with Node.js & Express.js

Introduction Integrating Sentry into a Node.js, Express.js, and MongoDB backend project significantly enhances error tracking…

4 months ago

Comparing Callbacks, Promises, and Async/Await in JavaScript

Introduction In the world of JavaScript development, efficiently managing asynchronous operations is essential. Asynchronous programming…

6 months ago

How To Secure Nginx with Let’s Encrypt on Ubuntu EC2 Instance

Introduction Let's Encrypt is a Certificate Authority (CA) that makes it simple to obtain and…

8 months ago