1

I currently work for a company that has hired me to manage a website that has been installed by a former developer.

I have access to the cpanel host and hold 100% authority to the website.

with that being said, I barely know how to assemble HTML and CSS into a working blog theme on Tumblr. where shall I get started on obtaining the knowledge on how to dissect a completely functioning PHP image-board forum?

I have a text editor, internet browser, and all the free time in the world.

maybe another way to ask this question: how do I edit PHP via my domain host / text editor.

5

Listed in order from most cowboy, shoot-from-the-hip, maybe-this'll-work-but-at-least-I-tried way to do this up to most controlled, process-oriented way to do this:

  1. Get an FTP program, download the files that you want to edit, edit them with Notepad or Notepad++, and use FTP to upload them again, see if your edit worked.
  2. Figure out that pushing changes that you haven't tested to a live environment is a bit like driving down the freeway with a blindfold on. Use Xampp or Wampp to set up a server on your local computer. Download all the files from the website and edit them, test everything locally before you figure out what works, then track down exactly which files were changed and use FTP to upload them again. Find a different text editor.
  3. Get tired of doing that, because tracking changes by hand is a PITA, and probably means that you'll overwrite work that you missed last time or end up with conflicts between your work and somebody else's. Also it's super-tedious. So learn enough Git to be scary, and set up a private Github or Bitbucket repo. Edit files locally, push changes to your git repo. Learn a little about ssh, and log onto your server and pull the git files down from the repo. Research PHPStorm, and decide to take the plunge.
  4. Notice that sometimes your app behaves a little differently because it's running on your machine rather than the production server, and usually it's running in 'development mode' on your computer (which makes debugging new features easier), while it's running in 'production mode' on the main server. Decide to create a staging server that looks and behaves exactly like the production server, except only you and the testers at your company get access to it. Deploy code to it using the same method as before, except now you can deploy more often, because code in the staging environment can be tested by multiple people but still isn't public.
  5. Figure out that sometimes you're still causing errors because sometimes changes that you make in one part of the code affect other things that you didn't realize. Learn a little about testing and continuous integration. Create some integration tests to make sure some of the main pieces of functionality are working. Connect your git repo up to a Continuous Integration service, so it runs your test suite every time you push new code to the repo.
  6. Fill out your test suite so it's catching edge cases and error states in the code. It'll take time, and you won't really know what to test at first. Start to trust it. Connect your continuous integration service to your server; set it up so that changes pushed to the main branch that pass all tests are considered ready for production and auto-deploy to the server.

Since to a complete noob this probably looks insane, only you can decide what level of process your project requires. Start where you can, and move up to the level where it starts to feel like overkill. Until it doesn't.

  • Really good answer to an essentially unanswerable question. Kudos. – Robert Harvey Dec 5 '16 at 6:03
  • Impressive answer. Bookmarking just for educational purposes ! – Luceos Dec 5 '16 at 6:55
  • 1
    Before changing anything for the first time, make a backup of the full code as an archive file (so you don't accidentally change it). – CodesInChaos Dec 5 '16 at 10:36
  • thankyou, I got a lot of lashback on the stackoverflow community for asking such a barbaric question. I really appreciate the effort you put into this answer. – user255777 Dec 6 '16 at 3:14
  • 1
    Honestly, it's not an answerable question until you get to that very last line - "how do I edit php?", and even that is... obviously a complex and nuanced answer, which also should include, "I don't know anything about your server or your company so you've gotta figure this out yourself." OTOH, I hate responding to noobs with "RTFM" and "Getoffmylawn" so you get an answer. – Jen Dec 6 '16 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy