In this article, you will find a step-by-step guide on how to open and edit PHP files on your computer, whether it's Windows or Mac OS X.

Windows

Step 1. Install Notepad++.

Step 1

First, download and install Notepad++. This free text editor is perfect for working with PHP files. To install the program:

Step 2. Launch Notepad++.

Step 2

Open Notepad++. If the program doesn't start automatically, click the "Start" button, type notepad++, and select it from the list.

Step 3. Select File

Step 3

Click on the File section located in the top left corner of the Notepad++ window. The menu will open.

Step 4. Choose Open

Step 4

Select the Open option from the menu. This will open a file explorer window.

Step 5. Locate the PHP File.

Step 5

Navigate to the folder containing your PHP file and select it by clicking on the file name.

Step 6. Click Open

Step 6

Click the Open button located in the bottom right corner of the window. Your PHP file will now open in Notepad++, allowing you to view and edit its content.

  • If you made any changes, remember to save the file by pressing Ctrl+S before closing Notepad++.

Mac OS X

Step 1. Install BBEdit.

Step 1

Download and install BBEdit — a free program that supports multiple file formats, including PHP. To install:

  • Visit the website https://www.barebones.com/products/bbedit/ in your browser;
  • Click on "Free Download" at the top right of the page;
  • Double-click the downloaded DMG file;
  • If prompted, allow the installation of software from unidentified developers;
  • Drag the BBEdit icon to the Applications folder;
  • Follow the on-screen instructions.

Step 2. Open Spotlight.

Step 2

Launch Spotlight by clicking the magnifying glass icon in the top right corner of the screen.

Step 3. Launch BBEdit.

Step 3

Type bbedit in the search bar and double-click on "BBEdit" in the results list.

  • If you're launching BBEdit for the first time, click "Open" when prompted, then select "Continue" to activate the 30-day trial version.

Step 4. Go to File

Step 4

Select File in the top left corner of the screen. The menu will open.

Step 5. Choose Open

Step 5

Click Open in the File menu. A Finder window will open.

Step 6. Find Your PHP File.

Step 6

Navigate to the folder with your desired PHP file and select it by clicking on its name.

Step 7. Click Open

Step 7

Click Open located in the bottom right corner of the window. Your PHP file will now open in BBEdit, allowing you to review its content.

  • You can also click "Choose".
  • Remember to save your changes by pressing ⌘ Command+S if you've modified the PHP file.