Geany – A Lightweight Editor for Editing PHP Files on VPS

When managing a website on a VPS, you’ll often need to edit PHP, HTML, CSS, or JavaScript files to modify the interface or add new functionality. A lightweight yet powerful editor like Geany allows you to do this efficiently without relying on resource-heavy IDEs like VS Code or PHPStorm.

This guide will walk you through installing Geany on Windows, MacOS, and Linux, and how to edit PHP files on a VPS using Geany in combination with FileZilla. Additionally, if your VPS is managed by VPSSIM, you’ll also learn how to clear the OPcache cache to ensure that your changes take effect immediately.

Furthermore, if you are using Cloudflare Proxy, edited files like .txt, CSS, and JavaScript may not update immediately due to Cloudflare's caching. In this case, you’ll need to clear the Cloudflare cache for your changes to appear correctly. If you're using VPSSIM, you can do this directly within the VPSSIM menu without logging into Cloudflare.com.


1. Why Use Geany?

Geany is more than just a simple text editor—it offers many useful features for web developers:

✔ Supports multiple programming languages, including PHP, HTML, CSS, and JavaScript.
✔ Auto-completion for faster coding.
✔ Simple, fast, and lightweight—perfect for low-resource systems.
✔ Works well with FileZilla for direct file editing on a VPS.

If you frequently work with websites on a VPS, Geany is an excellent tool for quick and efficient source code editing.


2. How to Install Geany on Windows, MacOS & Linux

2.1. Installing Geany on Windows

  1. Visit the Geany download page: https://www.geany.org/Download/Releases.
  2. Download the Geany Setup for Windows (.exe).
  3. Open the .exe file and follow the installation instructions.
  4. Once installed, open Geany and start using it.

2.2. Installing Geany on MacOS

  1. Visit https://www.geany.org/Download/Releases.
  2. Download the Geany for MacOS (.dmg).
  3. Open the .dmg file and drag Geany into the Applications folder.
  4. Open Geany and start coding.

2.3. Installing Geany on Linux

For Ubuntu/Debian:

sudo apt update && sudo apt install geany -y

For CentOS/RHEL:

sudo yum install geany -y

For Arch Linux:

sudo pacman -S geany

Once installed, open Geany using:

geany


3. Editing PHP Files on a VPS Using Geany & FileZilla

When working with a website on a VPS, source files are typically located in the public_html folder of your domain. If your VPS is managed with VPSSIM, files will be stored in:

📂 /home/domain.com/public_html/

For example, if you need to edit the index.php file for example.com, you will find it at:

/home/example.com/public_html/index.php

Here’s how to edit PHP files using Geany and FileZilla.


3.1. Connecting to a VPS & Editing Files Using FileZilla

  1. Download & Install FileZilla

  2. Connect to VPS via FTP/SFTP

    • Open FileZilla, go to FileSite Manager.
    • Click New Site and name the connection.
    • Enter the FTP/SFTP details:
      • Host: VPS IP or domain.
      • Username: FTP or SSH account.
      • Password: FTP or SSH password.
      • Port: 21 (for FTP) or 22 (for SFTP).
      • Protocol: Choose FTP or SFTP - SSH File Transfer Protocol.
    • Click Connect.
  3. Download & Edit Files with Geany

    • Navigate to /home/domain.com/public_html/.
    • Right-click the file to edit → Download.
    • Open the file with Geany, edit it, and save changes.
    • Return to FileZilla, right-click the local file → Upload to overwrite the file on the VPS.

💡 Tip: If you frequently edit files on your VPS, you can set FileZilla to Edit Directly with Geany, so you don’t have to download and re-upload files manually.


4. Clearing Cache After Editing Files to See Immediate Changes

4.1. Clearing PHP Cache (Zend OPcache) on VPSSIM

If your VPS is managed with VPSSIM, PHP files might not reflect changes immediately due to Zend OPcache, which caches compiled PHP scripts for faster execution.

👉 How to clear OPcache on VPSSIM to apply changes immediately:

  1. Open VPSSIM Menu.
  2. Select [Manage Zend OPcache].
  3. Choose [Clear Zend OPcache Cache].
  4. Reload the website to check for updates.

4.2. Clearing Cloudflare Cache for .TXT, CSS, and JavaScript Files

If Cloudflare Proxy is enabled, your .txt, CSS, and JavaScript files might still be cached, preventing changes from appearing in the browser.

👉 How to clear Cloudflare cache:

  • Standard method: Log in to Cloudflare.com, go to Caching → Choose Purge Everything or clear specific files.
  • Faster method using VPSSIM:
    1. Open VPSSIM Menu.
    2. Go to Clear Caches / Auto-Run VPSSIM.
    3. Select Clear Domain Cache on Cloudflare.com.
    4. Choose the domain to purge cache.

After clearing cache, refresh your browser using Ctrl + Shift + R to bypass local cache.


5. Conclusion

Geany combined with FileZilla provides a simple yet effective way to edit files on a VPS. If your VPS is managed with VPSSIM, don’t forget to clear OPcache and Cloudflare cache after editing to ensure changes take effect immediately.

I hope this guide helps you work more efficiently with VPS and Geany. Thank you for reading !

  • Created

    18 days ago
  • Last reply

    18 days ago
  • 0

    Replies

  • 28

    Views

  • 1

    Users