In today’s guide , I am gonna share one of the most requested feature that customers want on Cloudways but are unable to achieve i.e. a File Manager.
As you may all already know that Cloudways don’t have File Manager they suggest you to use SFTP or SSH to access your files. While SSH is too complicated and advance for customers who are either very non-technical or used to File Manager available at Cpanel, SFTP can be used as an alternative to File Manager but it requires few mins to get familiar with but one drawback with SFTP is that it’s slow, like really really slow, at a time like when you need to upload and download multiple files the more time can be spent on development instead of doing actual work.
So I started searching for a solution or anything useful that can be used for those who needed a simple alternative, after going through lots of script and other git hub repositories I came across Tiny File Manager.
I must say this one of the cleanest and a simple yet powerful File Manager as it doesn’t consist of dozens of files to work together it’s just a single PHP file.
So how you can install it on Cloudways.
Step 1: Download the File Manager
The very first step is to download the File Manager from the official git hub in your PC
Simply visit the link here and click on the download as shown below

Step 2: Set your Username and Password
After downloading the file open the tinyfilemanager.php in your text editor like Notepad++ or Sublime.
Now if you see the code you will see there is a part where you can set a username and password for your login

Here if you see the default username/password given are:
admin/admin@123 & user/12345
The part before the => shows you the username and the one after that is the encrypted password changing the default password is a good practice you can easily generate your new password here in my case I just generated a random password using the option and then copy the encrypted format and replace it in the code for both users

After updating the password you will see that there is another code like the one below:

You will notice that the option says read only kindly note this is one of the feature of this file manager as you can see you had 2 users by default one was admin and the other was user if you add the username of the user under this block it will make it a read user only i.e. anyone who login using that user will only be able to read files he will not be able to modify it. or do anything else. you can read more about how to give restricted access to another user on Cloudways in my next article that will be published later and will cover one or more feature of Tiny File Manager.
Step 3: Upload the File Manager Script
Now since you have set the password and everything it’s time to upload the tinyfilemanager.php file in your application public_html folder via SFTP.

After uploading the file now just visit your site like https://yourdomain.con/tinyfilemanager.php you will be asked to enter your username and password you just set earlier and there it is, now enjoy your file manager and Cpanel experience on Cloudways.

Step 4: Adding extra security (Optional)
Even though this File manager has a username and password authentication but still it’s not too safe as the URL that you have will be publicly available to everyone so the very first thing would be not to use common name for the file, changing the filename from tinyfilemanager.php to something with random pattern should be a good practice e.g file63dmanager.php or anything you like.
Secondly, you can restrict the access to the file manager from specific IPs, this option is good for users who have static IPs from their Internet Service Provider (ISP) if your IP is dynamic and it changes on daily or hourly basis then there is no need to follow this step.
To restrict the access from specific IPs add the code below at the start of your tinyfilemanager.php file after the <?php
//Limit Access from IP $allow = array("123.456.789", "456.789.123", "789.123.456"); //allowed IPs if(!in_array($_SERVER['REMOTE_ADDR'], $allow) && !in_array($_SERVER["HTTP_X_FORWARDED_FOR"], $allow)) { header("Location: https://yourdomain.com/"); //redirect exit();
}
Remember to change https://yourdomain.com/ with your site URL, if any request comes from an unknown IP that’s not added white listed array it will be redirected to your homepage
With this you have successfully install File manager on your site at Cloudways and develop a secure way to access your files, let us know your thoughts in the comment section.
How did you fix the permission issue?
If you are having any issue with file’s permissions,have you tried resetting permissions from the Cloudways Dashboard?
IP blacklist and whitelist is available in Tinyfilemanager configuration ($ip_whitelist and $ip_blacklist) it self. no need of add extra code.
I am not able to extract the tar of zip files. Anybody got any idea how to do that in tinyfilemanager? There is default option to extact these files.
Like!! Really appreciate you sharing this blog post.Really thank you! Keep writing.
Excellent post. Needed this!
This file manager will be a installed on the entire server or only for that specific application on Cloudways. For example, I have multiple installations on a single server with different domains.
So can i install this file manager which will give me access to files on the entire server?
The file manager will be installed per application, if you have multiple installs on your Cloudways server then you must follow these steps for each application.
Hi, with this you can also unizip compressed files on server?