How To Install WordPress Locally


Sometimes we need to install wordpress locally abd develop the blog theme and all plugins needed before launching the website online. Plus it’s really good to work on mysql and run a php files without the MUST to be connected in internet.

So here we are, the first things to do :

– Install a local server (Mac: MAMP, PC:XAMPP or WAMP).
– Create a new database.
– Download WordPress from and extract the files to a new folder under the htdocs folder.
– Rename the wp-config-sample.php file to wp-config.php and update the database details according to your local server.
– Run wp-admin/install.php and follow the instructions to install WordPress.

Now you are done, grabb your theme and work normally…

When you are satisfy of your local website, transfert everything to your server this way :

– Login to your local phpMyAdmin, select the database from the dropdown. Click on the Export tab:
Under the Export field, make sure all tables are selected
Under the Structure field, tick “Add DROP TABLE / DROP VIEW”
Tick “Save as File”
Then click Go and it will prompt you to download a SQL file

– Find & Replace All Local URLs
Open the database SQL file with a text editor. Find and replace all local URLs with your domain URL (eg. replace all “http://localhost:8888/mysite” with “”).

– Import The Database
Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go.

– Upload WordPress
Upload the entire WordPress folder to your server.

– Change The wp-config.php Setting : On your server, open the wp-config.php file. Change the database details to reflect your server settings.

– Go to your website and everything should work perfect.



Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.