DevOpsSauce
DevOpsSauce

Reputation: 1387

How to access php project from localhost (Apache)

I know this question may first appear to be a duplicate of others, but I'm asking this because I have WordPress installed in my /var/www/html directory. I was learning WordPress a couple of years ago before creating a website and never used it again.

Well, I'm creating a php project using PhpStorm and testing in my browser. I'm following a tutorial so I can configure my databse (phpmyadmin), and the instructor keeps going to his localhost, which displays the directory structure as seen here:

localhost directory structure

Since I have WordPress on my localhost, navigating to that takes me to my WordPress installation, which is not what I want to access.

I would rather ask this question on here before I potentially break my Apache configuration, so how can I access this project? Do I need to remove WordPress completely? It would be nice to keep it for future testing since I'm slowly getting into making plugins.

What are your suggestions? I can't really say much as far as "what have you tried?" since I don't know where to begin.

Running in Chrome within my PhpStorm IDE takes me to localhost:63342/projectName/respectivePhpFileName.php, but I can't access it outside of the IDE yet.

Any help would be appreciated.

Upvotes: 0

Views: 3908

Answers (1)

Asfo
Asfo

Reputation: 413

Just move your Wordpress outside your htdocs folder...I think he is using something like XAMPP so in that way is very easy to do it, because the folder without an index will be detected as a directory not a Wordpress URL (correct me if I'm wrong). So if that doesn't works, just go to your htdocs (/var/www/html or opt/lampp/htdocs in Linux) directory (or where your wordpress is stored) and move it to other folder (like My documents) where you can backup it, and that's it, you can create that folder and keep following that tutorial.

Upvotes: 1

Related Questions