Guides and InsightsWordPress


In this article we will see how to install WordPress locally on your computer, especially with Windows operating system and package EasyPHP. In this way you will be able to develop and test your blog without having to access the Internet. Pre-requisites: On Linux platform, you must have already installed Ubuntu, the LAMP suite (or equivalent eg. XAMPP) and administration tool phpMyAdmin (already included in the packages above). We will follow two paths, the first for a new installation of wordpress, or without the presence of a legacy database and the second to export our existing wordpress blog, so with an existing database.

1 Clean installation of WordPress locally

First you need to grab WordPress. You can download the latest version from here.


At this point we must prepare the database for WordPress. To do this, make sure you have booted adi apache server and mysql in this order, and open a session of Firefox.


Therefore launching the tool phpmyadmin by typing the URL into the address bar http://localhost/phpmyadmin (or refer to the package installed, eg. EasyPHP if there is already prepared the link to click to start the tool should be of

Now named “wordpress” your database and click Create: At this point we only have to install WordPress, after downloading the latest version is necessary to extract the contents of the zipped folder www, reached by following this path: C: \ Program Files \ EasyPHP 2.0b1 \ www done this, type the following address in the navigation bar of your browser: Fill form as shown in this image (leave the password field blank) and click Submit: You are now ready to proceed with the installation and perform your test: phpDatabasesubmit

2nd Installation of WordPress with the local export of a legacy database

Concerning the prerequisites are the same as the first method, which we have already installed a package lamp, type EasyPhp with Apache and Mysql assets.

Exporting remote

Get to the most important (you should already performed with some regularity, at least for the database, which contains data that does not want to lose): The backup of WordPress.

Backup files

This should already know how to do if you were you to install WordPress! Using the same program that you start your blog loads on the server (eg for Windows – and more recently, also for Linux and OS X, though still in beta, gFTP for Linux – Debian / Ubuntu , just the usual apt-get install gftp, and for Mac OS X), download the entire contents of the directory containing wordpress (including subdirectories) in a local directory.title=”Filezilla download page (scroll down to the Linux and Mac)” href=”″>title=”Home page and download page of the project” href=””>

Database Backup (dump file)

You can use the web interface phpmyadmin (provided by whom we usually host) or, if our hosting service supports it, plugin for WordPress (which should overcome the limitation on the size of the backup file – or dump – imposed by phpmyadmin).

Import local

Importing files

Simply copy the backup files in the Document Root in Apache and usually this is it:

  • in / var / www / Linux I suggest you create, as root, a sub-directory, such as WordPress, and, again as root, give her permission to read and write to all users:
    $ On (or sudo -s to Ubuntu) # cd / var / www
    # Mkdir wordpress
    # Chmod a + rw wordpress

    This allows you to copy files under wordpress as normal user (I repeat, these instructions are only for personal use, not follow them if you need to set up a production server!). To access it from browser, type the address http://localhost/wordpress (but do so only at the end).

  • in Applications / XAMPP / htdocs under Mac OS X, even here recommend creating a subdirectory wordpress. The address will http://localhost:8888/wordpress;
  • in c: \ EasyPhp \ www \ under Windows, as above, copy the backup to a subdirectory (eg wordpress). The address will http://localhost:8888/wordpress.

Editing wp-config.php

Subdirectory under the document root, where you copied the backup, duplicate the file wp-config.php in wp-config.php_remoto and now changed the first lines of wp-config.php as follows:

define ( 'DB_NAME', 'insert-here-his-name'); / / The name of the local database
(probably will call it as it is called remotely)
define ( 'DB_USER', 'root'); / / Your MySQL username
define ( 'DB_PASSWORD', 'root'); / / ... and password - it will probably be
This is the root password, unless you are being asked during
install mysql
define ( 'DB_HOST', 'localhost'), / / 99% chance you will not need to change this value

Save and then duplicate again the file wp-config.php in wp-config.php_locale (that way you can go from local to remote – and vice versa – simply by restoring the files _remoto and _locale). I recommend you to enter a password, many times the error of incorrect connection to your database depends on a mistaken reading of the blank password!

Import the database

Come to the last step before being able to access our local copy of the blog.

Edit the dump database

This is the most important part, which allows you to navigate the blog using the local area and not remote. With this step, for example, will not have to manually change the path to all images you’ve uploaded to your blog and then inserted into various places. It operates on the backup file, so it is important that this step precedes the actual import. First, if the dump is being downloaded in compressed format, you must unzip it, then, should be replaced with a text editor, all occurrences of the remote URL (eg with http://localhost/wordpress. Council to save the dump amended in another file, so as to still have a good backup if something goes wrong (Murphy is always listening! ). Note: The next recommendations are also valid in case you want to transfer your blog to a new hosting service, simply enter the new URL in place of the local.

Linux and Mac OS X

With Linux and OS X just one command! After having moved with the terminal (the OS X is located in Applications / Utilities) to the directory containing the dump file (for example, dump.sql), enter as normal user: $ sed-e 's REMOTE_ADDRESS ^ ^ ^ LOCAL_ADDRESS g 'dump.sql> dump_local.sql Following the example so far, the command will be: $ sed-e' s ^ ^ http://localhost/wordpress ^ g 'dump.sql > dump_local.sql


You must use a text editor, so no Word or Wordpad (you can also use it, but you have to choose the format “text only” when you go to save). Usually, simply use the function Find / Replace editor. To replace strings on very large files (like it could be your dump file), you can use a text editor like Notepad + +

Import the dump file amended

Now just enter phpmyadmin on the local computer (usually in http://localhost/phpmyadmin – the address is different for Mac OS X), click Import and select the file dump_local.sql previously amended.

After restoring the backup, you must rebuild the structure of the permalinks for WordPress: just go to http://localhost/wordpress/wp-admin (add port: 8080 after localhost if you’re using OS X), navigate to Options / Permalinks and press the Update Permalink Structure (no need to change anything, the problem is resolved Permalink too). This obviously also applies if you are transferring from an old server WordPress to a new one. Finally your copy, fully working locally, on your blog!

Realated Articles:

  • Finding MAC address for WIRELESS and ETHERNET devicesFinding MAC address for WIRELESS and ETHERNET devices Here are the steps to follow to find the MAC address of a Wireless or Ethernet devices, for operating systems Microsoft Windows 7, Vista, XP, 2000, NT and even Macintosh and Linux..
  • How to install a theme on WordpressHow to install a theme on Wordpress (WARNING method is valid only for private users or host server (eg and the like) using, in fact users that have a free blog at registered are not allowed ...
  • FaceBook – Special CharactersFaceBook – Special Characters Many of you, using the world's most popular social network, you will certainly will face the so-called "special characters", and you will be asked more than once, "but how the heck you spe...
  • Stellarium – Virtual PlanetariumStellarium – Virtual Planetarium Stellarium is a software project that allows the user to use your PC as a virtual planetarium. E 'can calculate the position of the sun, moon, planets and stars, and play in the sky as they would a...
  • Changing the IP address static / dynamic in Windows XPChanging the IP address static / dynamic in Windows XP Source: To change the IP address in Windows XP, open the Control Panel (Classic view), then double-click Network Connections. Alternatively you can click with the right mouse button ...

10 Responses to “How to install WordPress locally – both new installations and existing export blog”

  • forex account says:

    Thanks for good read, bookmarked your blog for future referrence

    • tecnics says:

      Glad to have you help, the site is still under construction, will be ready in a few days, continues to follow TECNICS, you can always stay abreast of the latest articles by subscribing to the RSS feed, or with the Mailing List, see you soon!

  • unlock codes says:

    I spent a lot of time reading your blog, it’s awsome

  • free karaoke software says:

    What tamplate do you use in your blog? Very interesting articles

  • free palm pre says:

    Excellent article, bookmarked for future referrence

    • tecnics says:

      Thank you, to stay up to date on the latest articles recommend using the newsletter or the RSS service. You soon!

  • Graco says:

    Thanks, always wanted to set it up locally for testing purposes, since I don’t want any possibly non-working stuff online, but so far I never managed to get it installed and running properly…till today 🙂

    • tecnics says:

      I’m glad, you can follow our updates through the newsletter if you want, so you can stay updated to new Articles

Leave a Reply


Articles Email Notification:
If you'd like to receive an email notification for each new article, enter your email address here
Who's Online
0 visitors online now
Search in Tecnics