When managing PHP dependencies in Plesk using the PHP Composer extension, you may occasionally see an error message stating that a
composer.json file is invalid or that the specified folder path cannot be found. This often happens if project files were moved, renamed, or deleted, causing Plesk's internal interface to hold onto a stale file path.This guide will walk you through verifying your
composer.json file and using the Rescan feature in Plesk to automatically resolve path conflicts.
Step 1: Locate Your composer.json File
Before updating the tool, ensure your primary
composer.json file exists on your web server:- Log into your Plesk Control Panel.
- Go to Files (File Manager) in the left-hand menu.
- Navigate to the directory for your domain following this path: Home directory > [Your Domain Name] (e.g.,
Home directory > example.comor inside a subfolder like/gallery). - Confirm that
composer.json(and optionallycomposer.lock) is present in that directory.
Step 2: Verify composer.json Syntax
If Plesk reports that the file itself is invalid, verify its content:
- Click on
composer.jsonin Plesk File Manager to open the text editor. - Check that the file is not empty (0 bytes).
-
Ensure the JSON syntax is correct (no missing quotes, trailing commas, or broken brackets).
- Tip: You can copy and paste your file contents into a free online tool like JSONLint to validate its formatting.
Step 3: Reset the Composer Path in Plesk (GUI Rescan)
If clicking "Change Folder" or "Edit composer.json" inside the PHP Composer tool throws an error or loops endlessly, Plesk is trying to read a stale or deleted file path.
How to Fix it in the Plesk Interface:
- Navigate to PHP Composer under your domain in Plesk.
- Look at the top-right corner of the PHP Composer dashboard and click Rescan.
- Plesk will automatically clear its cached database path and scan your directory structure to re-bind directly to your active
composer.jsonfile.
Note on Command Line (SSH/CLI) Access:
Please note that command-line (SSH/CLI) access is disabled on standard shared hosting environments for security reasons. All PHP Composer scans and package management actions must be performed directly through the Plesk Web GUI interface using the Rescan button.
Still Having Issues?
If clicking Rescan does not automatically detect your
composer.json file, or if the PHP Composer interface remains stuck, please reach out to our Support Team with your domain name and project folder path, and we will be happy to assist!
Comments
0 comments
Please sign in to leave a comment.