Test Run WordPress Development Environment in Eclipse

We assume that you have successfully imported wordpress files into Eclipse. Now the next step is to test run the changes you make in wordpress right inside Eclipse. For this we must be able to run the wordpress from the localhost

Running wordpress from the localhost

Assume that your wordpress workspace in eclipse is /home/users/workspace/wordpress
Now go to your htdocs directory /usr/local/apache2/htdocs/ It may be different for you.

Create a symbolic link to wordpress workspace

$ cd /usr/local/apache2/htdocs/
$ sudo ln -s /home/users/workspace/wordpress/ wordpress

Now you can access the wordpress from localhost like ‘http://localhost/wordpress‘. Try accessing this URL from the browser. If everything is fine, we can continue with the following steps.

  1. Go to Eclipse, with the wordpress workspace.
  2. Go to Run->Run Configurations
  3. Double Click PHP Web Page (Or Right click PHP web page and click New)
  4. Give Name “WordPress  Configuration” in the Name input box
  5. For PHP Web Server, press configure
  6. In the Name section, Enter WordPress Localhost server
  7. In the URL section, enter http://localhost/
  8. Press Ok
  9. And now you are back to the Server Configuration menu.
  10. In the File section Enter /wordpress/index.php
  11. Press Apply
  12. The Savings will be saved.
  13. Press Run.

And now you can see that the WordPress runs right inside your eclipse. You can experiment going through various links

Every time, you open/work with  eclipse, you can follow either of the following steps

  1. Click Run->Wordpress Configuration
  2. Go to Run->Run Configuration->PHP Web Page->Wordpress Configuration and Press Run

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s