How to edit a file in cPanel
The built-in File Manager editor lets you fix a file right in the browser, without FTP or programs on your computer. Most often it is used for .htaccess, wp-config.php, .user.ini, robots.txt and site templates.
Open a file
- Select the file in "File Manager".
- Click "Edit".
- In the encoding check window, click "Edit". For UTF-8 sites you do not need to change the encoding.

Encoding: when it matters
Old Ukrainian and Russian sites are sometimes saved in the windows-1251 encoding. If you open such a file as UTF-8 and save it, Cyrillic text turns into garbage or question marks. For these files choose windows-1251 or cp1251 in the encoding window. The site encoding is shown by charset in the template or in the CMS settings.
The "Disable Encoding Check" link removes this window; you can bring it back in the File Manager "Settings". If the account has sites in windows-1251, better keep the window.
Editing and saving
The editor opens in a new tab, with syntax highlighting, search and line numbers.
- Make your changes.
- Click "Save Changes" at the top right.
- Click "Close".

After saving, open the site in a private window and check the page the change affects. If an error appears, put the copy of the file back.
Make a copy before editing important files: copying. A mistake in .php or .htaccess breaks the site at once.
"View" opens a file read-only - handy for looking at a log or settings without changing anything by accident. "HTML Editor" is a visual editor for .html pages; do not open .php files in it, it can damage the code.
Common mistakes
- A missing semicolon or quote in .php - the site shows a blank page or error 500. The error text is in the error log.
- Code pasted from Word or a messenger - curly quotes instead of straight ones break it. Copy code from a plain text file.
- Large files (logs, database dumps) open slowly in the editor - download them and view them on your computer.