If you have another copy of index.php on another PC - yes you can upload it onto the server.
If it needs altering a bit make the alterations and then upload it. It does not matter where the file comes from. I write my websites on my PC and upload them to the server.
Thinking about it things may be different if using something like wordpress?