DEV Community

Brunner
Brunner

Posted on

why php developers should edit their files directly on the deployment server. part1

This post is for php developers. And who use local servers like mysql and wamp to edit their backend code. Before uploading them to the deployment server.

The deployment server refers to the main server that powers your online website. It is not the server you use purposefully for debugging and nothing else.

I wrote this post because its good to see that, files behave in different ways on different servers.

Let's dive into the ways php files are different on both local and deployment servers.

  1. CHECK YOUR FILE NAMES. Wrong file names still work on mysql server but do not work on deployment server. For example, on mysql, 'myfile.php' is the same as 'myFile.php'. so 'https://website.com/myFile.php' is the same as 'https://website.com/myfile.php'

But on the deployment server, or your website host server, 'myfile.php' is not the same as 'myFile.php'. So if the link 'https://website.com/myFile.php' works, then the link 'https://website.com/myfile.php' will not work and vice versa.

Therefore, after testing your files on the local server, be sure to check the file names again before uploading them onto the deployment server.

In order to avoid all this work, why don't you create and edit the files on the deployment server directly, so that you do know they work from the ground up.

This way, users can continue to access your website and your links while you edit them.

Top comments (2)

Collapse
 
eduluz1976 profile image
Eduardo Luz

Isn't better just keep consistent the file names, across all environments?

Collapse
 
brunner1000 profile image
Brunner

Thanks for your feedback.
I agree with you