Editing a website file safely in Plesk

Plesk File Manager can make a small, controlled edit to a website file. Use a text or code editor for source files and configuration. A visual HTML editor, where an extension provides one, is not an appropriate editor for PHP code or structured application configuration.

What you need before you begin

Identify the exact file and create a recoverable copy before editing. For a production application, use its supported deployment or staging workflow where available. Know how to restore the original if a syntax error interrupts the website.

01 Edit a website file safely in Plesk

  1. Open Files for the correct subscription and browse to the file. Confirm the domain document root and filename, including letter case.
  2. Download a backup or copy the file into a private backup location. Do not leave a publicly accessible copy containing database credentials or source secrets.
  3. Open the file action menu and choose the available text or code editor. Read the surrounding content before replacing a line.
  4. Make the smallest intended change. Preserve quoting, brackets, encoding and line structure required by the language. Avoid pasting formatted word-processor text into code.
  5. Save, then reopen the file to confirm the saved content. Run the application-specific syntax or configuration check when available and safe for your access level.

How do I check the website after editing a file?

Test the affected page and one unrelated critical function. Check application logs for a new error at the time of the edit. If caching is involved, clear only the relevant cache through the application supported process.

Troubleshoot unexpected results

If the page fails immediately, restore the original file and confirm recovery before attempting another edit. If the editor cannot save, investigate permissions or quota rather than setting everything to world-writable. For a generated configuration file, change the source setting that generates it so your edit is not overwritten later.

Sources and further reading

  • 0 Users Found This Useful
  • plesk, web-hosting
Was this answer helpful?

Related Articles

Logging in to Plesk securely

Use Plesk to manage the websites and services included in a Plesk hosting subscription. The...

Changing your Plesk customer-account password

Change your Plesk account password when it has been shared, reused or exposed, or as part of an...

Resetting a forgotten Plesk password

Use password recovery when you cannot sign in to your Plesk account. Recovery depends on the...

Updating the email address on your Plesk profile

Keep your Plesk profile email current so account recovery and relevant panel messages reach...

Changing the language of your Plesk interface

Your Plesk interface language controls the labels and messages you see in the panel. It does...