In this post we are going to see the steps that are involved in installing WordPress either on you local machine or on a actual webserver.
WordPress is primarily based on PHP and works with MySQL or MariaDB. So we will need these software ready on our system before hand
As of writing this post latest version of WordPress is 5.2.8. You can download it from here (Download WordPress). Note: That by the time you go the website the version might have been updated. If you are looking for a different version for some specific reasons, see this page (WordPress All Releases)
Software Requirements and Version:
- PHP version 7.4 or greater
- MySQL version 5.6 OR MariaDB version 10.1 or greater.
- Apache WebServer 2.4+ (To be on safer side).
- phpMyAdmin (optional, required if you do not know how to use the command line mysql utility)
This post assumes that the above softwares are already installed and configured.
Pre install steps:
- WordPress works with one database that needs to be created before hand. You can use either phpMyAdmin or the mysql command line interface to create a new user and a single database assigned to the same
- Never user 'root' and nopassword setup. Make sure your mysql/mariadb root password is set to somthing strong.
- To create a new user and assign a database via mysql command line, connect to mysql/mariadb using the following command:
- mysql -u root -h localhost -p
- You will be prompted for the 'root' password, enter the same:
- On the mysql command prompt run the following query:
- Create a database:
- mysql> CREATE DATABASE mywpdb;
- Create a user with password:
- mysql> CREATE USER 'mywpuser'@'localhost' IDENTIFIED BY 'm@ki14$EEf';
- Grant database access to user created above:
- mysql> GRANT ALL ON mywpdb.* TO 'mywpuser'@'localhost';
- Keep a note of all the three things above, Username, Password and Host (localhost)
- Login with these credential and check if database is accesible.
- If you see the datbase just created we are good to go.
- Download WordPress: most probably you have already downloaded it, if not download the compressed (tag.gz or zip) as per your requirement. (Download WordPress).
- Locate Document Root: Depending what OS you are using you will need to know your document root, this is where we will be extracting the WordPress files.
- In GNU/Linux running apache it could be:
- For XXAMP/WAMP under other OS please check there documentation [ TBA ]
- Once done uuncompress the downloaded wordpress file in the document root directory. (You may want to keep it in some sub folder, but in reality WordPress would be the main CMS running your site, so make sure to first move all the files to the actual Document Root and not in a sub folder.
- Start installation: Open A browser and in address bar type:
- http://localhost (if files are copied directly into Document Root)
- http://localhost/wordpress (or whatever is the sub directory name, if installed in a sub directory)
- Click Let's Go
- Provide database and user information (The one which you created in previous steps)
- Creating wp-config.php (If directory is not writable). If there are permission issues you could see this page:
- Simply copy the code in a text editor and save it at wp-config.php in your document root or where ever you copied WordPress. (You will see a wp-config-sample.php here)
- Setup up Site Name and admin user (with password). In a live server make sure to give a proper email id, it is used for recovering password and getting update information.
- Click "Install WordPress" to finalize your setup.
- You should see the final message, telling you that WordPress is now installled.
- Click Login to be redirected to login page.
- Once logged in you will be redirected to Admin Panel, from where you can manage you site.
- From here you can either point you browser to http://localhost or Click the home icon to visit you site.
Thats it, you wordpress in now installed. Enjoy.
- Check out the following video for demo:
Add new comment