Web programming

Guide to installing WordPress for beginners

Ngoc Phuong

Ngoc Phuong

2020-05-08 . 62 view

WordPress is an incredibly popular CMS for both amateurs and professionals to build websites. So, what is WordPress, how do we use and install it? Let's explore.

I. Introduction to WordPress

1. What is WordPress?

WordPress is an open-source software used to develop websites ranging from blogs to ecommerce sites. WordPress was developed in 2003 and is now the most popular CMS.

WordPress is developed in PHP, however, even if you don’t know anything about programming, you can still build a complete website. That's the biggest advantage of CMS.

2. What can WordPress do?

WordPress can be used to build almost any type of website, from blogs and news sites to online shops. However, WordPress is optimized for developing blogs and news sites rather than an ecommerce site. If you intend to build an ecommerce website, you might want to use open-source software like OpenCart or Magento.

II. Guide to installing WordPress

Before you install WordPress, you must have PHP, MySQL, and phpMyAdmin installed on your machine. If you don't know how to install these separately, it will be quicker to install XAMPP.

1. Download source code from WordPress.org website

Go to the following link to download the open-source files.

DOWNLOAD WORDPRESS FREE

2. Extract and review the source code

Open the downloaded file and extract it, and you'll get a folder named "wordpress".

Proceed to open the wordpress folder. You’ll see some folders named wp-admin, wp-includes, wp-content and a few files named index.php, wp-config-sample.php. We refer to all these files and folders as the WordPress source code.

3. Copy the source code to the localhost folder

Copy the wordpress folder into your machine's localhost folder, if using XAMPP, the following path, C:\xampp\htdocs

After copying, be sure to configure Virtual Host for this wordpress folder. Although this step might not be necessary, it's beneficial for better performance when uploading code to Hosting in the future.

4. Create a database for the website

For WordPress to run on localhost, you'll need a MySQL database to store data such as posts, settings, etc.

Visit phpMyadmin to create a database. If you're uncertain, read my article here.

5. Configure the database

In the source code folder, create a file named wp-config.php, then copy all content from the file wp-config-sample.php into the newly created wp-config.php.

Make sure to modify the following lines

/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );  // database_name_here thay thế bằng tên database bạn đã tạo ở bước 4

/** MySQL database username */
define( 'DB_USER', 'username_here' );  // username_here mặc định là root, nêú bạn có tạo user cho database thì nhập vào

/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );  // password_here: điền password vào, nếu không có thì để trống.

Remember to save changes once you've made them.

If you configure incorrectly, a "Error establishing a database connection" notification will appear.

6. Launch website and start installation

Visit the link in the Virtual Host configuration for the source code. By default, it should be http://localhost/wordpress

At this stage, you'll see a language selection form for WordPress installation, choose English and hit Continue.

Next, you're required to input information about the website, such as website name, admin username, password, etc. Once done, hit Install WordPress.

Wait for around 2 to 5 minutes, you will then receive a success notification, click login and proceed to the login page.

Enter the account you created earlier.

Once you successfully login to the admin page, your installation process is completed.

To view the homepage, use the link you set for Virtual Host or visit http://localhost/wordpress.

If you want to access the admin page, just add /wp-admin like this: http://localhost/wordpress/wp-admin.

Ngoc Phuong
Ngoc Phuong

Web Developer

Thank you for visiting my website. My name is Ngoc Phuong, and I have over 10 years of experience in website development. I am confident in stating that I am an expert in creating impressive and effective websites. If you need a website designed, please feel free to contact me via email at [email protected].

0 feedback

Related article