Running PHP Scripts

I am a newcomer to Dreamhost and have a very basic question. I attempted to run a simple PHP script by placing the script in my root directory, changing the permissions, and using the command

The error message was “requested URL not found”.

I have searched the Dreamhost documentation and forum for some basic guidance to get started - but, wasn’t able to find anything on the basics.

Can anyone point me in the right direction? Any help would be greatly appreciated.


The problem probably stems from what you mean when you say your “root” directory.

In the DreamHost file system, your user’s “root” directory is “/home/yourusername”, and that is the directory you will find yourself in when logging in via FTP/SFTP. This directory is not web accessible.

Within that directory you will find directories named “yourdomain.tld” (by default), or whatever you selected when you “Added” the domain to the hosting system. Those directories are “web accessible”, and that is where you should put pages/scripts/etc. that you want to be able to reach on the web with a browser.

So, in order to be able to browse to “”, assuming you have added “” as a fully hosted domain in the Control Panel, you should place the “test.php” file in the “” directory beneath your user “root” directory, so that it “lives” in “/home/yourusername/”. :wink: