Uncategorized

How to Install & Run WordPress Locally on Windows or Mac

In my opinion, one of the reasons WordPress has captured such a large market share is the easy learning curve that welcomes everyone. So, if you’re a complete novice or an experienced developer, chances are you’ll have a WordPress-based website up and running within hours.

One of the best things about WordPress development is the fact that you can set up your development environment anywhere you want and really focus on writing WordPress hooks instead of messing around with the environment variables. In this regard, your options range from installing it on your local system to a fully managed cloud server.

Reading: How to create a local website using wordpress

In this post, I describe how to install WordPress locally and set up a fully functional development environment to support you , whether you are building your first WordPress website or need to create a quick demo for a client.

Why do you need to install WordPress locally?

The barrier to entry for using WordPress is very low , because it is an open source platform that anyone can freely use for their projects. As I mentioned earlier, almost every web hosting solution you can think of supports WordPress – from a shared server to fully managed WordPress hosting solutions (like Cloudways, where you can launch a full-fledged WordPress site with just a few clicks) . You can choose a solution that suits your budget and experience.

But today I will only discuss WordPress installation locally on your computer. Here are three main reasons why you should have a WordPress local development environment

Learn and Develop

If you are just getting started with WordPress local development and want to improve your skills as a WordPress developer is the offline platform is an ideal option. Best of all, there’s no cost and you can learn WordPress development at your own pace.

However, you can always hire a WordPress developer to get professional help on the go and save time.

See also  Creating a drop-down list in a cell

p>

Here are the 10+ best places to find and hire WordPress developers!

Testing new features

Testing new features on a live site is not a good idea can disrupt and disrupt your business processes. By installing WordPress locally, you have a safe place to test new features, themes and plugins.

An isolated development environment

Local WordPress setup offers a risk-free and isolated development environment maximum flexibility to experiment with new tools and techniques. In many cases, you need an environment to test ideas and play around with code. Once you have a prototype ready, you can move it to a test site for QA and improvements.

How do I install WordPress on localhost?

Installing WordPress on localhost is very easy.

It is important that WordPress itself does not run directly on your local computer. A web server, PHP, and a database (MySQL is a popular choice) are required for proper operation. The combination of these components creates the environment in which WordPress operates.

Typically, the process of creating a WordPress environment consists of the following steps:

  • Setting up the environment
  • Download a stable version of WordPress
  • Install WordPress on local host

Install WordPress on Windows

This section covers WordPress installation on Windows operating system. The following steps show how to set up and configure a virtual host on Windows 10 using XAMPP.

Step 1: Download XAMPP and WordPress

Before you download WordPress, it is important to set it up the right environment in which to run it. On Windows, this is achieved by installing XAMPP or WAMP to set up a server-database stack (the industry favorites are Apache as a web server and MySQL as a database).

In this tutorial, I use XAMPP, developed by can be downloaded from the Apache website.

You will see different options that work with different versions of PHP. I’ve selected the options that work best with the latest PHP version.

Once the download is complete, run it to install XAMPP on your local system. After installation, launch the control panel to view and set the status for Apache and MySQL.

See also  FullStack - How to create a working blogging website with pure HTML, CSS and JS in 2021

install XAMPP

See also: How To Create a Small Web Application with CakePHP on a VPS (Part 1)

Starting these two services is necessary to install WordPress locally.

Step 2: Install and set up WordPress locally

After setting up the web server and database, download the WordPress setup from the official website.

Set up WordPress locally

Move the ZIP file to the /htdocs folder in the XAMPP directory. Unzip the file and navigate to the project directory.

IMPORTANT: Make sure Apache and MySQL Services included in the XAMPP control panel are operational.

Next, visit the phpMyAdmin portal to create the database of your new WordPress site. You will most likely find the portal at the following URL (depending on your port configuration).

http://localhost:80/phpmyadmin/

phpmyadmin

Once the database is created, start the WordPress installation setup by going to the following URL.

http://localhost:80/newwpsite/wp-admin/setup-config.php

Start WordPress

Select the language you want and click Next.

On the next screen, follow the steps to add Database credentials to wp-config.php file.

Database credentials add to wp-config.php file

Open the wp-config.php file in your favorite code editor and define d The database credentials as follows:

// ** MySQL settings – you can get this information from your web host ** // /** The name of the database for WordPress */ define( ‘DB_NAME’, ‘newwpsite’ ); /** MySQL database username */ define( ‘DB_USER’, ‘root’ ); /** MySQL database password */ define( ‘DB_PASSWORD’, ” );

Save the file and go back to the WordPress installation wizard.

WordPress Installation Wizard

Enter the database name, username and password. You can also define your own table prefix, but for now I’ll keep the default value. When you’re done, click Submit.

The next screen confirms the successful database configuration. Click Run Install to begin installing WordPress.

Perform installation

In the next screen, provide information about your website and set the username and password to access the WordPress dashboard.

See also: How to Make Your WordPress Blog Completely Private (4 Ways)

 WordPress Dashboard

When finished click on the “Install WordPress” button. This will show the success message and the button to launch the very familiar WordPress dashboard login page.

WordPress Dashboard Login Page

That’s all you need to do to install WordPress locally on your Windows machine.

See also  How to Make a Festival Wishing Website Script Free (Full Guide)

WordPress install on Mac

If you are a Mac user, you can also use WordPress locally on your Mac. Just like on Windows, you need to set up a stack to run WordPress locally. Although the steps are slightly different, the overall process of using WordPress locally on Mac remains the same.

Step 1: Download MAMP

In the first step, download MAMP, which is a web server setup and database for WordPress installation.

Go to the MAMP Office website to download the setup for macOS.

Download MAMP

Once the download is complete, begin installing MAMPP by completing the installation wizard carry out. You may be prompted to install the Pro version as well. This is not a mandatory requirement and you can get started with the free version by clicking on the gray folder.

Once the installation is complete, go to the MAMP controller and start the server.

MAMP Controller

As soon as possible the server is up and running , click Open WebStart Page to launch phpMyAdmin.

Step 2: Install WordPress locally for Mac

Mac users can use the WordPress setup for Download Mac from official website.

WordPress local for Mac install

After downloading WordPress for Mac, unzip the downloaded file and place the folder in the root folder of the MAMP document. You can rename this folder to the name of the WordPress site.

Now create the database using phpMyAdmin from the MAMP control panel. Luckily, phpMyAdmin works just like it does in Windows. Add the name of the database and go to the wp-config.php file to add the database credentials.

Now run the WordPress installation wizard by following the link http://localhost Visit /newwpsite.

p>

Installation Wizard

The rest of the steps remain the same as installing WordPress locally on Windows.

Final Thoughts

In this guide, I explained how to install WordPress locally on Windows and Mac installed. Using WordPress locally is convenient, and there are numerous use cases where using WordPress locally on your computer adds great value to your learning curve.

See also: How to Create Email Groups in Gmail

.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button