Setup the Eclipse + XAMPP + WordPress debugging system in my Windows Vista system, it takes quite considerable effort to figure out the workable way to all of these, record down the procedure.
1, download and install the eclipse,
You might have installed the JDK, for eclipse, tried to install the phpeclipse in my existing Eclipse 3.5.2 by menu “help->install new software…->add”, then input the link as: http://phpeclipse.sourceforge.net/update/stable/1.2.x/, found it’s not so easy to use.
but in this way I installed the DLTK plugin from this link: http://download.eclipse.org/technology/dltk/updates/
Finally gave up the phpeclipse, downloaded Eclipse for PHP Developers, it is Helios Packages, other versions might needs the Java 1.7 support, my system installed Java 16, with eclipse downloaded and installed, the PHP plug-in is ready to be used.
2, download and install XAMPP, “xampp-win32-1.8.2-6-VC9-installer.exe”, so easy, installed at F:\Server_Dev\xampp\.
3, wordpress downloaded from my personal blog, “blog.xionghuilin.com”
4, Eclipse configuration and project setup
“Eclipse->Window->Preferences->PHP Executables” as:
Execution Environment:
PHP Interpreter:
PHP Server:
Setup your wordpress project, you can create a PHP project and copy your wordpress folder into the project, the wordpress eclipse project will be successfully created,
At this moment, the eclipse will return some html syntax error(duplicate tag and unclosed start tag), this is caused by eclipse syntax validation,
Project->Properties->HTML Syntax:
modification to the PHP.ini, at the bottom, [XDebug], un-comments below a few lines,
zend_extension = “F:\Server_Dev\xampp\php\ext\php_xdebug.dll”
xdebug.profiler_output_dir = “F:\Server_Dev\xampp\tmp”
xdebug.remote_enable = 1
xdebug.remote_host = “127.0.0.1”
Now the Eclipse environment is ready!
5, PHPmyadmin setup (wordpress mysql database import and username/password setup)
create the root username and password for the mysql, if there is no security control, your data will be unsafe.
To create the root password for the mysql, In the phpMyAdmin window, select SQL tab from the right panel. This will open the SQL tab where we can run the SQL queries, input the SQL command “UPDATE mysql.user SET Password=PASSWORD(‘root_password’) WHERE User=’root'”
Now you will see a message saying that the query has been executed successfully. If you refresh the page, the PHPmyadmin will return the error as below,
the mysql root password is configured in the PHPmyadmin configuration file, [XAMPP Installation Path] / phpmyadmin / config.inc.php, in these several lines,
/* Authentication type and info */
$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;
$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ‘root_password’;
after the configuration, you can refresh the page and access to the PHPmyadmin again.
Now it’s time to import your wordpress database to your local mysql, I have a backup from my wordpress blog, first you need to create the database, click the new button,
Click the “Check Privileges” to add the username/password
the username and password should be the same as your wordpress database username/password in the wp-config.php, then there is no need to modify your wordpress source code, can be used locally directly, as in below picture,
input your password and username, should be the same as your wordpress blog database username and password as mentioned above,
Now the wordpress database is successfully imported to local mysql data base, you can debug with this environment you have setup,
Yeah! Start to enjoy your journey of wordpress now!
Webmentions
[…] 5, import the mysql DB through phpmyadmin. First export the DB from xionghuilin.com, then import through phpmyadmin, can refer to this link for detail, http://xionghuilin.com/?p=36 […]