Word Press
Word Press
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.
What is localhost?
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.
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.
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?
Your web browser is everything you need to view the website you have
created locally.
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:
2. Install Apache.
3. Install MySQL.
4. Install PHP.
5. Install WordPress.
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.
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.
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.
Follow the steps below to create a database and user for your WordPress
website:
8. Give all permissions to the user you are creating; select Check all.
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.
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.
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.
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.
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.
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.
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]
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.
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.
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.
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.
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.
Deepak Singla
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.
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.
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
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.
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.
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!!
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!!