> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.ex2.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to change the extension of a file via FTP or SSH?

Sometimes it might be necessary to change a file extension to make sure it works as intended. For example, if you create a text file on your computer, it is saved with the .txt extension. 

If the file should be a phpinfo.php file, . [htaccess](https://help.ex2.com/en/article/what-is-the-htaccess-file-and-what-is-it-used-for-1mgswq0/?bust=1676916316075), or other, the extension must be modified or removed. This article explains how to adjust the file extension via [FTP](https://help.ex2.com/en/article/what-is-the-ftp-protocol-jhosf3/?bust=1784053757312) or [SSH](https://help.ex2.com/en/article/what-is-the-ssh-protocol-10ohmg0/?bust=1784053786022).

## File extension change in Filezilla

These instructions assume that you have downloaded the file to the server hosting your site. Once the file is on the server, [connect using an FTP client such as Filezilla](https://help.ex2.com/en/article/how-to-access-or-connect-to-your-ftp-account-via-the-filezilla-ftp-1ilmnc2/?bust=1676916335706).

Right-click the file and choose 'Rename'. Edit the file to remove the .txt extension. Click 'Enter' and the file is immediately saved with the new extension.

## Change file extension via SSH

These instructions assume that you have downloaded the file to the server where your site is hosted. Once the file is on the server, log in by [using your SSH access](https://help.ex2.com/en/article/how-to-use-ssh-access-on-ex2-hosting-15g8fis/?bust=1676916335719).

Once connected to your server via SSH, navigate to the file location. You can then rename the file to remove the extension. For example, the following command changes a file named phpinfo.php.txt to phpinfo.php:

`[server] $ mv phpinfo.php.txt phpinfo.php`

This example shows how to remove the extension while renaming it:

`[server] $ mv php.ini phprc`


You can then run ls -la to confirm that it has been renamed:

`[server] $ ls-la`