Title: Problem Changing Code?
Last modified: February 3, 2021

---

# Problem Changing Code?

 *  Resolved [Robert Eichhorn](https://wordpress.org/support/users/robert-eichhorn/)
 * (@robert-eichhorn)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/problem-changing-code/)
 * I want to install a ‘.htaccess’ file in my ‘wp-content/uploads’ folder and add
   code to prevent the execution of PHP. When I try to save the ‘.htaccess’ file
   with the code in it a message appears saying you’re about to save in text-only
   so formatting will be lost. If I change the document type to allow formatting
   the ‘.htaccess’ file will become a ‘.htaccess.doc’ file type, which I don’t think
   will work as a HTACCESS FILE type. My first question is will changing a 6-pointed
   star-like character to a 5-pointed star-like character render the code useless.
   Here is the code:
 * <Files *.php>
    Deny from All </Files>
 * Note: I just learned that you’re not supposed to use a word program to edit a
   WordPress file, only a text editor. This step may preserve the 6-pointed star-
   like character.
 * My second question concerns what type of code format to use for the ‘.htaccess’
   file. Here are the examples:
 * 1) ‘.htaccess’ file in the root directory has this type of code format:
    # BEGIN
   WordPress <IfModule mod_rewrite.c> ———— </IfModule> #END WordPress
 * 2) ‘.htaccess’ file in the ‘wp-content/bps-backup’ folder has this type of code
   format:
    order deny,allow deny from all

Viewing 1 replies (of 1 total)

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/problem-changing-code/#post-13995164)
 * > Note: I just learned that you’re not supposed to use a word program to edit
   > a WordPress file, only a text editor. This step may preserve the 6-pointed 
   > star-like character.
 * It’s not really WordPress per see, but CODE generally. Every job has the appropriate
   tool for it.
 * You write code in a **code editor** or **text editor**, not with a wordprocessor
   software. Use the built-in Notepad program if you’re on Windows and don’t have
   any other code editor. If you’re on Mac, use the built-in TextEdit. If you’re
   going to be editing a lot of code, I’ll advise you to install a REAL code editor.
   VSCode is free from Microsoft but works on all platforms: [https://code.visualstudio.com/](https://code.visualstudio.com/)
 * Whatever you do, the file should exactly be saved as `.htaccess`.
 * That said, I fear you’re likely to inadvertently block yourself or even bring
   down your site, looking at the questions you’re asking. I would highly recommend
   you use a WordPress security plugin to do these sort of things for you automatically.
   Please see:
 * [https://wordpress.org/plugins/search/security/](https://wordpress.org/plugins/search/security/)

Viewing 1 replies (of 1 total)

The topic ‘Problem Changing Code?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [George Appiah](https://wordpress.org/support/users/gappiah/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/problem-changing-code/#post-13995164)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
