How To Install WordPress in Windows

How To Install WordPress in Windows

Step by Step Guide on setting up WordPress on Windows

WordPress is a popular, open-source content management system (CMS) allowing users to create, edit, and manage websites and blogs quickly.

WordPress is known for its user-friendly interface, extensive customization options, and vast plugins and themes, enabling users to add functionality and design elements to their websites without needing extensive coding knowledge. The platform is used for various websites, including personal blogs, business websites, e-commerce sites, online portfolios, and more.

There are two main versions of WordPress:

  1. WordPress.org: This is the self-hosted version, where you can download the WordPress software for free and install it on your web server. It gives you complete control over your website, including using custom themes and plugins.

  2. WordPress.com: This is a hosted version where your website is hosted on WordPress.com's servers. It's easier to set up and requires less technical knowledge, but there are limitations on customization and the use of plugins.

In both versions, users can create and manage content using the WordPress dashboard, a web-based interface allowing easy content creation, editing, and organization.

What you Need

  • Xampp installed

Downloading WordPress

[WordPress](wordpress.org/is an open-source CMS (Content Management System), it's available for free. To download the installation files, head over to wordpress.org/download.

Follow the following steps to install and start using WordPress locally:

1. Unzip the downloaded folder

Unzip the folder and move to C:\xampp\htdocs (htdocs inside Xampp directory).

Ensure that the document has the index.php file among other .php files in the root

file content

Xampp htdocs

Rename the folder to your project name. I will name mine hashnode.

Start Xampp Server

Open Xampp and start Apache and MySQL services.

Starting XAMPP

Test if the server is running by going to http://localhost/dashboard/

If a similar page like the image below loads up, everything is good to go:

Local Host Server

Create Database

On your browser, go to http://localhost/phpmyadmin/ to create a new database for the new WordPress site.

phpMyadmin

On the left panel, click on New to create a new database. I'll call mine 'hashnode'. Leave other options as they are and click on 'Create'.

Configure WordPress

On your browser, open the newly added WordPress site: http://localhost/{folderName}. Since I renamed mine to hashnode, I'll go to http://localhost/hashnode.

Select your language once the page loads. (English for me)

Screenshot_7.png

A new page load to add database configurations:

Screenshot_8.png

Replace database_name_here with the database name created.

Replace password_here with an empty space, since we don't have a password to the database.

Replace username_here with root

Refer to the code snippet below:

Alternatively you can add Database configurations to the wp-config-sample.php file. Locate where the database configurations are and edit as instructed below:

// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );

/** Database username */
define( 'DB_USER', 'username_here' );

/** Database password */
define( 'DB_PASSWORD', 'password_here' );

/** Database hostname */
define( 'DB_HOST', 'localhost' );

/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );

/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

Replace database_name_here with the database name created.

Replace password_here with an empty space, since we don't have a password to the database.

Replace username_here with root

Once that is done, click on submit. If the configurations are successful, an installation page loads:

Screenshot_11.png

Enter your site details as shown on the page (image shown)

Screenshot_12.png

Once you have entered the site details and your credentials, you'll be redirected to a login page, after that, your site is ready for editing!

Screenshot_13.png

Parting Shot!

I have never used WordPress locally, up until recently, and I had to document it. What do you think about WordPress, does it cater for your needs when creating solutions?