Learning WordPress is fun. Anyone with the wish to try creating a site would surely be tempted to its ease of use. Not just you, millions of people around the world depend on WordPress for their websites. That constitutes more than 43% of the total websites (1) live at this moment. I am sure you are geared up to try WordPress more passionately than ever before. Without installing WordPress on your local computer, it is hardly possible. With that in mind, in this article, we will tell you how to install WordPress on localhost.
How to Install WordPress locally on Your Computer
Installing WordPress on localhost is quite easy. You just have to follow some easy steps. You can not install WordPress on your local computer directly. You have to create an environment then install WordPress on localhost. Initially, it is about just 3 major tasks. Such as:
- Create an environment
- Download WordPress from its website
- Install WordPress on localhost
These 3 major tasks can be completed through some easy steps. Follow the following steps without skipping any of them to install WordPress on your computer successfully.
Step 1. Download a Local Server Software
We need a local server software to create a localhost environment and install WordPress on localhost. In this tutorial, We are using MAMP for that (for its ease of uses). MAMP is a cross-platform web server solution stack package. Since WordPress is written in PHP language it requires a platform to run. MAMP is the way to do this. You can use the development environment of your choice according to your OS (whether it is Windows, MacOS or Linux).
Download MAMP from their official website.
The reason I am recommending MAMP is it works on both Mac and Windows operating systems. I found MAMP much more user-friendly than any other local server environment. If you have Linux running on your machine you need XAMPP. Check this link to know how to download and use XAMPP for this purpose.
Step 2. Install MAMP Server
Click on the downloaded MAMP and MAMP Pro package file to run the installer (both come in a single package by default). Click on the “Continue” on some subsequent popups until the “Install” option comes.
Click on “Install” upon agreeing to their terms of software license.
Step 3. Run MAMP on Your Computer
Once you have installed MAMP successfully, run MAMP on your computer and click on “Start Servers“.
After starting the servers, the system will take you to a success page in your default browser displaying some information.
Now your MAMP is ready to work.
Step 4. Create a Database
Your WordPress site needs a database to save its data on. Go to localhost/phpmyadmin on your browser. Click on “New” and give it a name then click on “Create” to finish the process.
Have the “Database Name” in mind as you need to use it in the future.
Step 5. Download WordPress
To install WordPress on localhost you need to download WordPress from the official website. Unzip the downloaded zip file.
Step 6. Put WordPress in MAMP’s htdocs
Now go to the MAMP directory in your computer’s system drive. Open “htdocs” folder (found inside the MAMP directory) and paste unpacked WordPress folder in there.
Step 7. Install WordPress on Localhost
Type localhost/wordpress (name of your WordPress file in the htdocs) on your browser’s address bar and hit enter. Now perform a few more actions to complete the WordPress installation on localhost. Select language and click “Continue“.
Click on “Let’s go!” button on the following page.
Give all Required Information
This page requires “Database Name” (the database you’ve created earlier in Step 3). Username and Password both will be “root” as mentioned in the MAMP installation success page.
Hit the “Submit” button at the bottom and click “Run the installation” on the very next page.
Complete WordPress Installation with Admin Information
Give your site a title, username, password, and email address. Finally hit the “Install WordPress” button at the bottom.
You have successfully installed WordPress on your computer. Log into your locally hosted WordPress site now.
Another great alternative to MAMP is DevKinsta, Kinsta hosting’s a free local development tool. The key features of DevKinsta include one-click WordPress site creation with multisite and WP-CLI support and a modern stack powered by Nginx, MySQL, and the latest versions of PHP. It also ships with advanced database and email management tools as well as full integration with Kinsta’s hosting dashboard MyKinsta.
Download the latest version for macOS, Windows, or Ubuntu here.
If you have followed all the steps above, you stand no chance of facing any error along the way of WordPress installation on localhost. Now do whatever you want with your WordPress site on your computer. We come up with such essential tutorials on a regular basis. Keep visiting Themeum to get more. Good luck.
Sources:
1. 43% of the web uses WordPress.
janth
Hi. Thank you so much for this tutorial i have tried with xamp but it was always so hard and clunky to get it working properly. Then i found “YOU” and you have turned computer rage into computer calm. Great tutorial …..THANK YOU.
Mirza Rizvi Amin
Thank you so much for your kind words. We always appreciate our reader’s feedback. Keep an eye on our blogs and socials for more future content.
Kenispar
After the above steps.. which was successful, i tried importing a theme I purchase from forestheme and the message I got is *****The link you followed has expired.***
Please try again., please what the possible solution to these.. need answer ASAP please.
Sekander
Hi,
This might happen due to the upload limit of WordPress or PHP. You may try uploading the theme folder via FTP software or use cPanel file manager.
For more details, you can follow this tutorial.
VicKing
Hi Rayhan Arif,
Please, which one easier for beginners MAMP or WAMP?
🙏
Sekander
MAMP is best in my personal opinion 🙂
sam29
I want to create content and theme for my website using wordpress, can i do it using localhost first and move it to a different host later?
Rayhan Arif
You can surely do that. Please follow this tutorial once your site is ready. https://www.themeum.com/migrate-wordpress-site-localhost-live-server/
cjpmcglinchey
Great tutorial thanks, I have setup xamp with WordPress I have it running local, what I would like to know is how do I access my website offline. Also is there anyway to retrieve the the username and password for the backend.
Sekander
You can access your website from http://localhost:8888
I did not understand your question about accessing the backend. Did you mean PHPMyAdmin? If yes, it should be root for both username and password.
svanik
my localhost/phpmyadmin is not working
Rayhan Arif
Hello svanik! Please make sure your MAMP ports are set to default. Otherwise you have to go to a different URL. It could be something like localhost/8888/phpmyadmin. Please check your MAMP ports first.
svanik
I cannot
get welcome page
kossman
I just installed MAMP but I can’t seem to start server. Each time I click it it only shows green light on the Apache server the stop
Sekander
If you have Skype installed and that is using the port 80 or 8080 then sometimes this issue might happen.
You can change either Skype’s port or Mamp’s port. If this is not the issue, then you might check your firewall settings or antivirus settings. Those might block the port as well.
Additionally, you can check Apache or Mamp’s log file to see what is causing the issue.
ponycapozzi
At the end of step 6 (when attempting to load localhost/wordpress) I get “this site can’t be reached” and “ERR_CONNECTION_REFUSED” any ideas on what could be the issue?
Sekander
If you have Skype installed and that is using the port 80 or 8080 then sometimes this issue might happen.
You can change either Skype’s port or Mamp’s port. If this is not the issue, then you might check your firewall settings or antivirus settings. Those might block the port as well.
vo4041
I am short of words this is so helpful it is so easy and simple in fact this is just all that i am looking for thanks guys you are the best.
Rayhan Arif
You are welcome. Please do visit Themeum blog for more of such tutorials and tips.
startingtopuff
spoke too soon, when I launch phpMyAdmin i get a page load of errors.
“Warning in ./libraries/classes/Config.php#201 preg_match(): JIT compilation failed: no more memory BACKTRACE”
This error continues repeating itself “php#207, 214,221, 228” and so on.
I have a pretty powerful iMac with 16GB RAM and minimal processes running in background.
Arafat Bin Sultan
Have you tried increasing the available memory limit for the PHP process in the php.ini file?
You can follow this tutorial or this official doc to increate the PHP process memory limit in MAMP. Thanks.
startingtopuff
Hi,
I have the following PHP folders under Mamp 5.4.4.45, 5.6.40, 7.0.33, 7.1.26, 7.2.14 & 7.3.1 which should I configure? I still have a virgin installation with no uploads in place. Currently the 5.4.4.45 php.ini file is showing upload_max_filesize = 32M, post_max_size = 32M, memory_limit = 128M what do you recommend? Thanks
startingtopuff
I have edited the 5.4.4.45 php.ini file and added the following line: pcre.jit=0 Fingers crossed this seems to have cured the problem. Thanks
Arafat Bin Sultan
Welcome!
startingtopuff
Got as far as copying wordpress folder in to htdocs but when I browse to it I get server cannot be reached. Please advise.
Tashfia Fareed
Hello! After downloading WordPress, please paste the zip file in your htdocs then unzip the file in a folder inside htdocs. Then when you browse that folder in your localhost using browser, it should show this: https://www.themeum.com/wp-content/uploads/2018/04/selectlanguage.png
If this does not work, please check if your MAMP is set up and functioning correctly. Let us know if this helped or you can send us a video screencast or image screenshots!
startingtopuff
I noticed when looking at the Mamp landing page that port 8888 had been configured. I appended the path accordingly to localhost:8888/wordpress and all appears to be well. Thank you for your prompt response.
Arafat Bin Sultan
Nice to learn that you found our efforts useful. Please stay with us for more helpful resources. Have a great time. Thank you!