It’s occasionally required to modify a file extension in order for it to work properly. A text file created on your computer, for example, is saved with the extension.txt.
The extension must be modified or removed if the file is to be a phpinfo.php,.htaccess, or phprc file. This guide will show you how to change the file extension.
This post is based on the assumption that you have previously produced or uploaded the file to your GreggHost website. Instructions on how to upload or generate your file on the server can be found in the following articles:
FTP credentials and overview
What is the process for uploading my website to GreggHost?
When I’m connected via FTP, where do I put my files?
Using FTP to create and edit a file
Editing the file extension in Filezilla
These instructions presume you’ve used the links above to upload the file to GreggHost. Log on to the server using an FTP client like Filezilla once the file has been uploaded.
rename 01 in Filezilla
Choose ‘Rename’ from the context menu when you right-click on the file. Remove the.txt extension from the file. When you press ‘Enter,’ the file is saved with the new extension right away.
Editing the file extension via SSH
These instructions presume you’ve used the links above to upload the file to GreggHost. After the file has been uploaded to the server, log in as your Shell user:
SSH overview: Creating a user with Shell (SSH) access
Using SSH to create and edit a file
Navigate to the file’s location once you’ve logged into your server via SSH. The file can then be renamed to remove the extension. The following command, for example, changes the name of a file from phpinfo.php.txt to phpinfo.php: