How To Check If Your Web Site Can Run PHP Scripts (or WordPress)

by Ravi Jayagopal on 4/10/2008

  1. Create a file called phpinfo.php

  2. Enter these few lines of code in it: (you can copy-paste from below):

    <?php
    phpinfo();
    ?>

  3. Upload this to your root folder (where your home page (index.htm or index.html etc) lives.

  4. Access this script via the browser like this:

    http://www.YourSite.com/phpinfo.php

  5. You should see a nice page come up, with the PHP logo and headers, that shows all of your PHP configuration and settings. If you see it, then: Hurrah, you can run PHP on your site!

  6. If you see some kind of errors, first try changing the file’s permissions (chmod) to 755. (CHMOD Tutorial)

  7. If that still doesn’t work, then you’re probably SOL (S#!t Outta Luck). Confirm it with your web host.

  8. If your web host doesn’t support PHP, don’t waste your time – or your web site – with your current host. Just switch to where I host my own sites.

  9. WARNING: Don’t forget to delete the phpinfo.php file from your web site. Hackers can figure out a lot of stuff from this page!


Bookmark and Share

Leave a Comment

Previous post:

Next post: