Setting up a test website on a local system is a great way to test for new changes and possible errors before finally implementing the changes.
This is even true if you have a WordPress blog and want to make some changes, best bet would be to first make these changes in a sandbox environment before changing the live blog.
This is a two part series which will show how to setup a WordPress blog/site locally on a Linux Mint system for development and testing purposes.
Here is what is needed first :
A LAMP package (apache, php and mysql installed and running on Mint). If not installed, this post should set you up and running with a complete web server package called XAMPP.
Basically, the process of WordPress installation can be divided into two parts :
1. Creating a wordpress database and an associated wordpress user
2. Installing wordpress in the webroot directory
This part covers the first point.
Creating a WordPress database and an associated user :
Once XAMPP is up and running, we will need to setup a mysql database and a user before installing wordpress.
To do this, go to http://localhost and click on phpMyAdmin on the left side under Tools section.
Enter a database name (wordpress_db) under the MySQL localhost section, keep other settings intact and click the Create button.
Once created, select the new database wordpress_db, then click on the Privileges link and click on Add user which is at the bottom as shown by the arrow. (You can go to the main phpMyAdmin page by clicking the phpMyAdmin logo on top left during the process in order to go back and make new users, check privileges and so on).
In the Add New User section as shown below, enter the user name as wordpress_user, host as localhost and a password twice.Remember this password as we will be needing it during installation of WordPress later.
Also make sure to give full access to wordpress_db using the “Grant all privileges on database wordpress_db” option and then clicking Check All link in Global privileges section as shownÂ below.
Finally, hit the Go button at the bottom which should create the new user with given rights.
Verify that the new user created has full rights on wordpress_db by clicking on Privileges link, the associated rights should show up in the column as follows.
This takes care of the initial phase for installing WordPress, what we did was :
- Make a new clean database for WordPress
- Make a new user and assign rights to that user for accessing the WordPress database created.
Part 2 will be the heart of the whole process and definitely less boring 🙂 as we will actually install WordPress and make sure it is up and running.
Stay tuned for Part 2.