Title: CGI Installation
Last modified: August 22, 2016

---

# CGI Installation

 *  Resolved [supermoon10](https://wordpress.org/support/users/supermoon10/)
 * (@supermoon10)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cgi-installation/)
 * Hello. This’ll be my first wordpress hosted on a server using CGI execution. 
   Second wordpress installed, but first that I’ve had to actually go in and mess
   with the files. To get it out of the way–no, I don’t have a choice of hosts in
   this, so I can’t switch.
 * To make it work, our admin’s asked that we paste #!/usr/local/bin/php at the 
   beginning of every php file that will be directly accessed. My question is: how
   to spot what files will be ‘directly accessed’. Don’t know a lot about php, but
   from what I figure, if I paste it in php files that’ll be accessed within other
   files (or the like), I’ll get a duplicate #!/usr/local/bin/php showing up on 
   the actual page when it loads. So far I guess I’d just be looking for php files
   that aren’t referenced in the text of other php files. I’ve been browsing tutorials,
   but most just detail the scripting language.
 * Thought of first just pasting it in all of them and then viewing, working my 
   way back and slowly removing duplicates (if I can figure out where they’re coming
   from), but if someone with more php intel can explain. I’d appreciate it.

Viewing 1 replies (of 1 total)

 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/cgi-installation/#post-5519500)
 * It is never a good idea to modify the WordPress core files, this is because when
   an upgrade occurs the changes are lost. So keep track of which files you modify.
 * The only files you need to add the magic line to are:
    – index.php in all directories–
   wp-login.php in the top directory – /wp-admin/install.php – /wp-admin/upgrade.
   php
 * Now you can complete your installation process.
 * Once you are up and running, turn OFF automatic updates, details here:
    [http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7/](http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7/)
   [http://codex.wordpress.org/Configuring_Automatic_Background_Updates](http://codex.wordpress.org/Configuring_Automatic_Background_Updates)

Viewing 1 replies (of 1 total)

The topic ‘CGI Installation’ is closed to new replies.

## Tags

 * [CGI](https://wordpress.org/support/topic-tag/cgi/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 1 reply
 * 2 participants
 * Last reply from: [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/cgi-installation/#post-5519500)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
