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
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.
- Go to Eclipse, with the wordpress workspace.
- Go to Run->Run Configurations
- Double Click PHP Web Page (Or Right click PHP web page and click New)
- Give Name “WordPress Configuration” in the Name input box
- For PHP Web Server, press configure
- In the Name section, Enter WordPress Localhost server
- In the URL section, enter http://localhost/
- Press Ok
- And now you are back to the Server Configuration menu.
- In the File section Enter /wordpress/index.php
- Press Apply
- The Savings will be saved.
- 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
- Click Run->Wordpress Configuration
- Go to Run->Run Configuration->PHP Web Page->Wordpress Configuration and Press Run