We’re hosting WordPress/WooCommerce servers on AWS ap-southeast-1 Lightsail.
Three ways you can use to connect to WordPress/WooCommerce Servers directly:
- SSH
- Visual Studio Code
- SFTP (e.g. FileZilla)
Preparation: Add Your SSH Public Key to Servers’s authorized_keys
To connect to server, your SSH public key must be added to selected servers. Contact your manager for access.
Your manager will share you information about selected servers via Notion or Google Docs.
1. SSH
To connect via SSH, you can use built-in ssh (Linux/MacOS) or Git Bash (Windows).
2. Visual Studio Code
See also: Visual Studio Code.
It’s recommended to edit files over SSH using Visual Studio Code: Remote Development using SSH. Check out the video below for example.
Troubleshooting: When saving a file, got error: Failed to save.. Unable to write file… EACCES: permission denied, open…
Root Cause: User ubuntu
does not have permission to write these files on server.
Solution: Change the permissions to allow write access:
sudo chown -Rc www-data:ubuntu /var/www/staging.produkindo.com/htdocs/wp-content/plugins
sudo chmod -Rc g+w /var/www/staging.produkindo.com/htdocs/wp-content/plugins
3. SFTP (e.g. FileZilla)
Note: If you want to edit files, it’s recommended to use Visual Studio Code instead.
You can connect using SFTP client, for example FileZilla. You can transfer files and edit them.