0% found this document useful (0 votes)
10 views19 pages

Word Press

This document provides a comprehensive guide on how to install WordPress on localhost using various environments such as WAMP, MAMP, XAMPP, and LAMP. It explains the concept of localhost, its benefits for website development, and outlines the necessary steps to set up a local server, create a database, and install WordPress. Additionally, it covers how to install themes and move a local WordPress site to a live host after development.

Uploaded by

BrosGee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views19 pages

Word Press

This document provides a comprehensive guide on how to install WordPress on localhost using various environments such as WAMP, MAMP, XAMPP, and LAMP. It explains the concept of localhost, its benefits for website development, and outlines the necessary steps to set up a local server, create a database, and install WordPress. Additionally, it covers how to install themes and move a local WordPress site to a live host after development.

Uploaded by

BrosGee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

How to install WordPress on localhost in 5 simple steps

There are several ways to install WordPress locally on your computer, but
all of them have one core thing in common – you’ll need a localhost
environment.

This guide will explain what a localhost WordPress installation refers to


and why it’s useful. Next, you’ll discover which WordPress localhost
environment is best for your operating system. Lastly, you’ll learn how to
install WordPress on localhost using WAMP, MAMP, XAMPP, and LAMP.

More in WordPress Local

What is localhost?

Localhost is a computer term that basically means “this


computer,” the one you’re currently using. When applied to a
WordPress installation, it refers to a website running entirely on the
computer you’re viewing it from.

This isn’t the typical browsing experience. Typically, when you use a
browser to visit a website, your computer receives that data, sent over the
internet from a host server — essentially a powerful computer tasked with
sending everyone files to be displayed as webpages.

In contrast, viewing a localhost website installation means your own


computer is the source of every file needed to display the website. On the
other hand, the website isn’t public — no one else can access it.

What is localhost used for? It’s an opportunity to create and test an


unfinished website without paying for WordPress hosting yet.

More in WordPress Local

The benefits of installing WordPress locally

The advantage of installing WordPress locally is that you will have more
privacy and flexibility to experiment with different settings. This can speed
up your website development and testing processes.

Considering that all of the files are stored locally, it won’t be necessary to
use an FTP connection to a web hosting server — you don’t even need an
internet connection.

Can I run multiple local WordPress websites?

Yes, it is possible to run multiple WordPress websites locally. All you need
to do is create separate folders for each website — name them WPsite1
and WPsite2, for example — and use different databases for each website.
How do I use WordPress on localhost?

In order to install WordPress locally, you need an Apache web server, a


database management system called MySQL, and a programming
language called PHP.

Your web browser is everything you need to view the website you have
created locally.

After installing a WordPress localhost environment using the steps outlined


later in this guide, you will have all these components ready. But first, you
must pick between the best localhost environments to use.

What’s the best localhost environment for WordPress?

The type of WordPress localhost environment you use depends on the


operating system installed on your computer. Most WordPress localhost
environments are optimized to work on multiple operating systems, but
each environment is optimized for a specific one.

There are four top-tier WordPress localhost environments for you to


choose from: XAMPP, WAMP, MAMP, and LAMP.

XAMPP

XAMPP is an acronym for cross-platform, Apache, MySQL, PHP and Perl. It’s
a multi-platform local server environment created by Apache Friends.
XAMPP is eligible to work on all three of the most used operating systems
– MacOS, Linux, and Windows. However, it’s optimized best for Windows.

Download XAMPP for free from the Apache Friends official website. Get the
latest version unless you have a prebuilt website needing an older PHP
version.

WAMP

WAMP stands for Windows, Apache, MySQL, and PHP. As you can guess,
it’s best suited for Windows systems to run a local server environment.
Download the latest version from WampServer to get started.

MAMP

The first letter of MAMP represents MacOS, which is what these local
server environments are optimized to run best on. However, it’s also
possible to install MAMP on WindowsOS. Download MAMP to start.

The “A” in MAMP stands for Apache, as usual. Notably, the second “M” can
be MySQL or MariaDB – both are database management systems.
Likewise, the “P” can be one of three web dev programming languages:
PHP, Python, or Perl.
LAMP

If you are a Linux enthusiast, LAMP is the perfect choice for you to test
your WordPress website locally. In order to install the LAMP stack on your
Linux machine, you will have to set up each component one by one. To
create a running localhost environment on Linux, follow these steps in
order:

1. Update your Linux OS.

2. Install Apache.

3. Install MySQL.

4. Install PHP.

5. Install WordPress.

6. Create a database for your WordPress website.

For Mac users and professional developers looking for a more elegant
solution, Valet WordPress offers a minimalist alternative that requires
fewer system resources and provides a faster setup process than
traditional stacks like MAMP or XAMPP. It’s particularly well-suited for
developers working on multiple projects simultaneously.

How do you install WordPress on localhost?

WordPress runs on PHP; therefore, PHP must be installed on the server


running WordPress.

With a public website, your web hosting company usually handles PHP
installation – but on localhost, PHP is included in the local server
environment installation, whether XAMPP, MAMP, or otherwise.

Furthermore, you need a database for your WordPress website. You


wouldn’t need to consider this while renting a web server, but you do
need to consider it while installing WordPress on your own computer.

Follow the steps below to install WordPress locally.

1. Download and install a local server software

Pick and install one of the local server environment solutions described
earlier in this guide. If you need assistance, consult our knowledge base
for tutorials on installing the local server environment you prefer.

2. Download the latest version of WordPress

Download the latest version of WordPress from the official website.

3. Create a database for your install


Make a database and a user to access files using phpMyAdmin, which you
can open via your browser’s address bar;
type localhost/phpmyadmin and hit Enter.

Follow the steps below to create a database and user for your WordPress
website:

1. In phpMyAdmin, click on New and name your database.


Importantly, remember your database name because you will need
it during the WordPress installation.

2. In the Collation drop menu, choose utf8_unicode_ci and


click Create.

3. Considering that you do not have a user already, go back to the


main menu by clicking on the phpMyAdmin logo in the upper left
corner.

4. Click on Users > Add user.

5. Enter a name for the database user; remember it because you’ll


need it for the WordPress installation.

6. In the Host drop-down menu, choose Local.

7. Enter a strong password you will remember.

8. Give all permissions to the user you are creating; select Check all.

9. Finally, click Go.

4. Install WordPress locally using your server software

Next, install WordPress on your computer using the localhost environment


you have set up.

1. Open the directory where you have downloaded wordpress-


6.0.2.zip. Extract the zip file to the htdocs folder in the local server
environment’s directory.

2. Let’s assign the database you created for your WordPress


installation. Do this by opening your browser and
typing localhost/wordpress into the address bar. Alternatively,
replace “wordpress” with the name you chose for your database.
Hit Enter, and you should see a WordPress installation page.

3. Choose your language and click Continue.

4. Enter the database name you created, your username, and the
corresponding password.
5. Type localhost in the Database host field, then wp_ in the Table
prefix field. Click Submit.

6. WordPress is ready to be installed. Click Run the installation.

7. You should see a welcome screen. Enter some info about your
WordPress website (you can change all of this later), including your
website’s name, your username, a strong password you’ll
remember, and your email.

8. Considering that you will be running WordPress locally, ignore any


options about search engine visibility – your website will only be
seen by you.

9. Click Install WordPress.

10. When the installation is complete, enter the login credentials


you created most recently.

5. Troubleshoot and test

By successfully installing WordPress locally, you can now edit, test, and
troubleshoot a website, including plugins and themes. Furthermore, you
can conduct cross-browser testing.

Experiment with different operating systems, screen sizes, and mobile


devices to confirm that your WordPress website works well on a wide array
of popular platforms.

One of the main ways to optimize your WordPress website is to use a top-
tier theme. What if you want to switch themes from within localhost?
Follow the steps below.

How to install a theme in WordPress on localhost

1. In your browser’s address bar, type localhost/wordpress and


hit Enter.

2. On the left sidebar of your WordPress dashboard, click


on Appearance > WordPress themes.

3. Choose the WordPress theme you want to install, then click


on Activate.

4. To install a premium WordPress theme you have purchased


elsewhere and downloaded, head to Upload, unzip the compressed
file, click Install, and finally, Activate.

Moving WordPress to a live host after local development


Once you’re satisfied with your website, here’s how to move it to a live
host.

1. Go to the directory where the folder of your complete website is


located. Compress the whole website folder by right-clicking on it
and selecting Compress to a Zip file.

2. Navigate to your web hosting browser’s dashboard. You can typically


do so by opening your browser; in the address bar, enter your
domain name followed by “/cpanel” – for
example, mywordpresswebsite.com/cpanel.

3. Enter your login credentials for your hosting provider.

4. When cPanel opens, click on the file manager and locate the folder
named /public_html. Remove the default files in
the /public_html folder. Replace them with your compressed
website folder by clicking on the Upload option and selecting the
zipped website folder.

5. Place the index file in the public_html folder.

6. Right-click on the compressed folder and choose Extract.

7. Click on the cPanel logo to return to the main menu.

8. Select MySQL databases, create a database, and add a database


user.

9. Open PHPMyAdmin and click Import, then select the database


you just created.

10. Set up the config files of your website according to the


parameters you set during database creation.

11. Click Go.

Next steps for WordPress local

Now you know how to install WordPress on localhost using WAMP, MAMP,
XAMPP, and LAMP, and you know how to install themes in WordPress on
localhost.

Once you have created your WordPress website locally, publish it in


minutes with Liquid Web, then sit back and relax. With the fully managed
WordPress hosting plan, you can now let Liquid Web experts handle setup,
admin, and maintenance whenever you want.

For even more assistance with your website goals, you’ll enjoy 24/7
service from the support team.
If you’re not hosting your WordPress website with Liquid Web yet, check
out our fully managed plans to get started today. Source: WordPress Local:
How to Set Up Localhost [5 Steps]

WordPress local development with XAMPP


One of the first environments I used to build sites with was XAMPP. The
XAMPP abbreviation stands for Apache, MySQL, PHP and Perl. The X
derives from the fact that XAMPP is cross-platform. Other tools like MAMP
are only for running Apache, MySQL and PHP on macOS. If you’re on
Windows you could look at using WAMP or WAMP Windows Server for an
environment that’s specific to Windows. We’ll look at XAMPP today
because it’s cross platform. If you learn to use it on Windows and then
switch to macOS or Linux, you get to keep the development environment
you know and love.

There are a few benefits to building your sites locally. First, you don’t have
to wait for changes to upload via FTP so you have faster turn around
times. Second, you don’t mess with a live site and break everything which
usually makes clients upset.

Let’s walk through how to set up WordPress with XAMPP.

Installing XAMPP

To get started you’ll need to head to the Apache Friends site and
download the version of XAMPP that is meant for your computer.

If you’re on macOS you’ll need to open the DMG file that is downloaded
and then run it. Recent versions of macOS will complain that they can’t
verify the developer of the application. This simply means that it didn’t go
through Apple’s special signature process. You’ll need to go to the Security
Settings in your System Preferences where you should see a button that
lets you run the application anyway.

If you’re on Windows here are directions to set up XAMPP on Windows 10.


For Linux, this is a good set of directions to setup XAMPP on Ubuntu.

Once you’ve installed XAMPP on your machine and run it you should see
its start screen.

To start running your XAMPP click the start button. Occasionally when I’ve
freshly installed XAMPP on macOS I’ve run into issues with components
not being initialized due to the macOS security settings we just toggled. To
force XAMPP to initialize the components it needs to run the following
command in terminal rm -rf ~/.bitnami/stackman. Note that in addition to
getting XAMPP to install it’s initial components again, it will also wipe your
htdocs directory. If you already had sites installed, they’ll be gone so make
sure you kept a backup of your work.

Adding WordPress to XAMPP

To get WordPress installed we’ll first need to download a copy of it. Open
the .zip file you downloaded and we’ll move it to the htdocs folder. If you
dig around right now, you won’t find it though. First, we’ll need to head
back to XAMPP and mount the volume that contains our server files.

Now you should see it mounted in finder and you can navigate to htdocs.
Copy your downloaded copy of WordPress into this directory and rename
the folder nexcess-test. If you’re working on a client project, choose a
folder name that matches your client project.

Next, we need to create a database for our site to use, but first, we need
to return to the XAMPP application and turn on its connection to our
system. Go to the Network tab and enable localhost.

If you visit localhost:8080 you should see the default XAMPP starting
page. Windows users should find this same page at localhost. You can
access phpMyAdmin by visiting localhost:8080/phpmyadmin on macOS
or localhost/phpmyadmin on Windows so that we can create our database.

Click on Databases on the top left side of your screen and then enter a
name for your database and click create. Make sure you remember the
name you’ve used because you’ll need it in a minute for the installation of
WordPress.

To install WordPress we’ll need to visit the URL that corresponds with the
folder we created in htdocs. For me, that’s localhost:8080/nexcess-
test. Here I’ll see the default WordPress installation screen and need to
enter the information for my database connection and site.

The database name corresponds with the name of the database you just
created. Your username is root and you can leave the password blank.
Your database host should remain localhost. Also note that I change the
table prefix to match with my folder. You don’t have to do this, but it is
considered best practice.

Once you’ve changed this information to suit your settings click submit
and WordPress will install in XAMPP for you. If WordPress tells you it can’t
write your wp-config.php file in XAMPP then you have a file permission
issue which can be solved by editing them.

That’s it, XAMPP is now installed and running WordPress for us.

Developer tools
To get access to the XAMPP server so that you can run unit tests, you’ll
need to head back to the General tab in the application and click Open
Terminal. This will open the terminal on your computer connected to the
Debian Linux machine that is running your XAMPP server. From here you
can install PHPUnit and then run your unit tests.

XAMPP makes viewing your database easy as we already saw. Simply visit
phpMyAdmin and look through any database values you need to see.

To capture email for testing we’ll use MailHog again. Directions differ for
installing MailHog in macOS and installing MailHog in Windows. Either
way, once MailHog is installed you’ll be able to test the email systems of
WordPress without emailing all your site users by accident.

For those working on client sites or managing multiple WordPress


installations, tools like valet wordpress can complement your XAMPP setup
with additional deployment and management capabilities that streamline
your workflow.

Why XAMPP

While there are more steps involved in setting up XAMPP over other tools
like VVV it’s also got a graphical user interface. VVV relies on your being
comfortable with the command line, which was overwhelming when I was
starting development.

Using XAMPP gets you up and running with an easy graphical interface to
use as you deal with your server.

When you’re ready to launch, parter with the best hosting provider. Liquid
Web offers the widest range of hosting options specifically designed for
WordPress sites — from a simple VPS, to WordPress cloud hosting, to
dedicated WordPress servers for enterprise organizations. You choose your
favorite OS and the level of management support you need. Get in touch
today.

How to Install XAMPP on Windows 10 – A Detailed Tutorial

Deepak Singla

| Updated On April 15, 2020| Tutorials Install, XAMPP


If setting up XAMPP on Windows 10 is something which you are still unable
to configure, then following the below-given steps would save you a lot of
time and efforts. Once it’s installed, it will be a breeze to use it. In this
tutorial guide, I will show you how to install XAMPP on Windows 10 with
ease.

It’s always a good practice to test your site on the local server before you
actually publish it to the real server. And to create a local server
environment on your windows machine, you can use XAMPP. XAMPP
stands for X- cross-platform, A- Apache, M- MySQL, P- PHP, P- Perl. It is a
completely free and open source solution that gives you an incredible
local web server to work on. Installing XAMPP sets you free from learning
and remembering commands to run Apache, MySQL, etc. It simply gives
you a control panel to manage all the inclusive components.

Once you have XAMPP installed on your PC you can install any CMS,
including but not limited to WordPress on your Local PC. Since we have
already discussed how to move WordPress from localhost to live server so,
you don’t have to worry about the later process after installing WordPress
locally. Simply test your site thoroughly on XAMPP and make most of it.

How to Install XAMMP on Windows 10

So without ado, let’s get started with the step-by-step guide to how to
install XAMPP on Windows 10. And I am very sure by the end of this post,
you’ll be having your very own local WordPress testing environment on
Windows 10.

Step 1: Download and Install XAMPP


To download and install XAMPP, go to apachefriends downloads page, the
official link to download XAMPP from. You will see XAMPP ready to
download for cross-platform like Windows, Linux, Mac OS X. Since we are
discussing How to install XAMPP on Windows 10, therefore, we will choose
the Windows option as shown below.

Step 2: Run the Installer to Install XAMPP

1. XAMPP Setup Wizard

During the installation process, you may come across warning pop-ups.
But you would probably click ‘Yes’ to start the installation process. Soon
after you click on the downloaded file, the XAMPP setup wizard will open.
Now click on the ‘Next’ Button to proceed.
2. Select Components

Next, you need to check the components which you want to install and
can uncheck or leave as it is which you don’t want to install. You can see
there are a few options which are light grey in color. These are the options
which are necessary to run the software and will automatically be
installed. Now click on the ‘Next’ button to continue.
3. Select Installation Folder

Now you need to choose the folder where you want to install the XAMPP.
You can choose the default location or you can choose any location of your
choice and choose the ‘Next’ button to move ahead.
4. Bitnami for XAMPP

Now will see a window showing you information about Bitnami. Simply
click on the ‘Next’ button to move further. However, if you wish to learn
more about the Bitnami, then you may check the box saying ‘Learn more
about Bitnami for XAMPP.’
Basically Bitnami is for installing open source applications i.e. WordPress,
Joomla etc on your newly installed XAMPP.
5. Ready to Install XAMPP

Now you’ll see another window with a message “Setup is now ready to
begin installing XAMPP on your computer” like shown below. You just have
to hit the ‘Next’ button to proceed.
6. Welcome to XAMPP Wizard

Now just be patient and wait for the installation to complete.


7. XAMPP Installation Complete

Once the installation is completed, you will be asked whether you would
like to start the control panel now or not, displaying the message “Do you
want to start the control panel now?” Check the box and click on the
‘Finish’ button and see if the XAMPP is working fine.

Step 3: Select your XAMPP Install Language

As soon as you will click on the Finish button in the final step of install
XAMPP process, you will be asked to select the preferred language
between English and German. It is up to you which language you choose.
After that click on the ‘Save’ button to confirm your selected language. As
of now, I am choosing the English language.

Step 4: XAMPP is now Installed onWindows, run it


If the entire process of XAMPP installation went correctly, then the control
panel would open smoothly. Now click on the ‘Start’ button corresponding
to Apache and MySQL.

That’s it. You have successfully installed XAMPP on Windows 10. Or say
you have successfully installed XAMPP locally. Once you start the modules,
you should see their status turn to green. Whereas, on the right side, you
can see the process ID number and port numbers every module is using.
You’re good to go now. Happy XAMPPing!!

How to install XAMPP on Windows – Wrapping Up

Now you know how easily you can install XAMPP to test and install your
WordPress site locally before hitting the live server. Certainly, the biggest
advantage of installing XAMPP is that you don’t have to worry about the
number of attempts you make or the kind of experiments you perform on
your site. You can freely try anything you want without any tension of
losing your users. However, if you face any error while installing XAMPP on
your Windows machine, then do let me know in the comments below. I will
try my level best to resolve the errors. Nonetheless, creating a stunning
new website piece of cake if you use TemplateToaster offline web builder
softwared. It is indeed, a dynamic website builder to give you an amazing
website without any coding skills. So, try now!!

About Deepak Singla

Deepak Singla, the backbone of Template Toaster, having expertise in Web


Designing and Development. He is a knowledge enthusiast and a devoted
content creator, possessing 6 years of web-related experience.

You might also like