Science, Tech, Math › Computer Science How to Save PHP Files in Mac TextEdit Share Flipboard Email Print Scott-Cartwright/Getty Images Computer Science PHP Programming Tutorials MySQL Commands Perl Python Java Programming Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Angela Bradley Angela Bradley Computer Science Expert B.A, History, Eastern Oregon University Angela Bradley is a web designer and programming expert with over 15 years of experience. An expert in iOS software design and development, she specializes in building technical hybrid platforms. Learn about our Editorial Process Updated on September 30, 2018 TextEdit is a simple text editor that comes standard on every Apple Macintosh computer. By following a few simple steps, you can use the TextEdit program to create and save PHP files. PHP is a server-side programming language that is used in conjunction with HTML to enhance the features of a website. Open TextEdit If the icon for TextEdit is located on the dock, as it is when the computer ships, just click the icon to launch TextEdit. Otherwise, Open a Finder window by clicking on the Finder icon in the dock.Choose Applications from the menu on the left.In the list of applications on the right side of the screen, find and double-click TextEdit. Change the TextEdit Preferences From the Format menu at the top of the screen, choose Make Plain Text. If you don't see this option, but see "Make Rich Text," the document is already set for plain text.Select Preferences from the TextEdit menu at the top of the screen.Click the New Document tab and confirm the radio button next to "Plain text" is selected.Click the Open and Save tab and confirm the box next to "Display HTML files as HTML code instead of formatted text" is checked. Enter the Code Type the PHP code into TextEdit. Save the File Choose Save from the File menu. Enter your_file_name.php into the Save As field, being sure to include the .php extension. Click the Save button. If a pop-up asks you if you want to use .txt or .php as the file extension. Click the Use .php button. Testing You cannot test your PHP code in TextEdit. You can test it in PHP if you have it on your Mac, or you can download an emulator app from the Mac App Store—PHP Code Tester, PHP Runner and qPHP can all be used to test the accuracy of your code. Just copy it from the TextEdit File and paste it into the application screen. Cite this Article Format mla apa chicago Your Citation Bradley, Angela. "How to Save PHP Files in Mac TextEdit." ThoughtCo, Aug. 27, 2020, thoughtco.com/using-textedit-for-php-2694153. Bradley, Angela. (2020, August 27). How to Save PHP Files in Mac TextEdit. Retrieved from https://www.thoughtco.com/using-textedit-for-php-2694153 Bradley, Angela. "How to Save PHP Files in Mac TextEdit." ThoughtCo. https://www.thoughtco.com/using-textedit-for-php-2694153 (accessed May 29, 2023). copy citation