Blogie Blog

I am therefore I blog

 

  •  

 

WordPress on your local machine

You’re a Web developer and you need some sort of staging for your WordPress-powered site. You don’t like developing your site directly off of your production server because (1) Internet connectivity isn’t always reliable or fast, (2) you prefer to keep your site under wraps until it’s ready for the public eye, (3) some other reason I haven’t thougth of yet.

Although WordPress will run on Windows/IIS, chances are, your Web hosting will be on a Linux box running Apache. So, the best way to recreate that environment for local development on your desktop or notebook is to install a local Web server package. What I use now to develop new WordPress sites is WampServer 2.

WampServer emulates the Apache Web server with PHP and MySQL installed. All the necessary modules that WordPress needs (e.g., mod rewrite) are present, and it takes just a few minutes to install and run. Do you feel a how-to coming on…?

OK, let’s get started. I’m assuming here that you use Windows. If not, I’m sure you’ll find something similar for your Mac. ;)

Installing WampServer

Download WampServer 2 from the link above, and install it on your local machine. It will do everything in the background for you, including installing PHP and MySQL. What’s more, you’ll even have access to your own phpMyAdmin and, if you prefer the classic approach, a MySQL console.

After installation and initial launch, you’ll get a WampServer icon on your system tray, looking like half a speedometer. Click on it to bring up the menu. If it’s not online, click on Put Online. If you type “localhost” on your browser URL bar, you will see something like this page:

localhost screenshot

To install WordPress, follow the steps below. But before that, don’t forget to activate Apache’s rewrite module — without this, you won’t be able to make use of WordPress permalinks. Left-click on the WampServer icon on the system tray, and go to Apache » Apache modules. You’ll then get a long list of modules arranged alphabetically. Look for rewrite_module and check it.

Installing WordPress

OK, now for WordPress. Extract the WordPress .zip file onto c:\ — this will create c:\wordpress. You may change the name of the folder to anything that you fancy, but for our purposes, let’s keep it as is.

Bring up the WampServer menu, and create an alias directory: Apache » Alias directories » + Add an alias. This will cause a command-prompt window to open with the following screen:

Enter your alias.
For example,
 
'test'
 
would create an alias for the url
 
http://localhost/test/
:_

Let’s use blog as our alias. The next screen will show this:

Enter the destination of your alias.
For example,
 
'c:/test/'
 
would make http://localhost/blog/ point to
 
c:/test/
:_

Enter c:/wordpress/, the directory we created earlier. When successful, a message saying “Alias created. Please Enter to exit…” will appear. Now you’ve created a website account with the URL, http://localhost/blog/.

Next, let’s create the database and database user in MySQL. Take a look at this page from the WordPress.org codex for step-by-step instructions on creating databases using phpMyAdmin.

Armed with your database name, username and password, you can now go ahead and perform the famous WordPress 5-minute install. Load http://localhost/blog/ on your browser, and you’ll see that WordPress says it will create the configuration file for you. Go to the next screen and enter the database credentials, and voilá! You now have a WordPress site running on your desktop or notebook!

WP2.8′s theme installation / uploading should work, as well as the similar interface for plugins. Everything should look and feel as if you had a live WordPress install, except that this one’s probably much faster and responsive.

To the bat cave!

After you’ve done your design work, template-tweaking and all your customizations, after publishing your new site’s static pages (“About”, “Contact Form”, etc.), and probably a few blog posts as well, you can now deploy your WordPress site onto your production server.

Backup your database by following this excellent procedure written by Automattic.

Use cPanel or FTP to transfer the WordPress folders and files (wp-admin, wp-includes, wp-content & all the .php and other files in the main directory) to your website account on your production server. No need to reinstall WordPress. Simply transfer the entire local site to the live Web.

WP-DBManager options page

WP-DBManager options

arrow If you’ve installed plugins (e.g., WP-DBManager) that have settings asking for server paths, make sure to change them to the proper values as soon as you finish transferring your site. Take a look at the screenshot of WP-DBManager, which I installed in my own WampServer-driven local WordPress site. As you will see, the server paths indicated are those of my local machine’s. After deploying this site to the Web, I should change these values to my production server’s paths. (Good thing this plugin has auto-detect buttons!)

Now for your database. Presumably, you already have a .sql file on your local hard drive, generated by the backup procedure above.

On your production server, bring up phpMyAdmin and create a database with the same name as the one you created earlier on your local machine. Specify the same username and password as well. (Otherwise, if you use different database login credentials, change those values in your wp-config.php file.) Now, choose that new database and select Import from one of the horizontal tabs, and follow the instructions.

And that’s it! Your new WordPress-powered site’s live! Woot!

Possibly Related Posts:
WordPress 2.5 is out!  |  Great deals on WordPress themes  |  B.O.B. contest in honor of WordPress  |  Upgrading multiple WordPress installs  |  WordPress plugins I use

3 Responses to “WordPress on your local machine”

  1. faust 5 July 2009 at 6:49 pm #

    learned the basics especially using the alias thing in pointing the sites, which i was tied up earlier, now i can start testing sites that are wordpress powered.

    accomplished!

  2. Robert Mark (a.k.a. midsummer) 16 July 2009 at 4:42 pm #

    Hey, you have to teach me this soon! Anyhow hope to hear to hear from you and have you over here in Manila soon.


Leave a Reply

Notify me of follow-up comments via email. You may also subscribe without commenting.

delivered prednisone buy prednisone tablets without rx purchase prednisone pay pal online without rx prednisone overnight where to purchase generic prednisone online without a rx cheap prednisone by money order next day prednisone delivery online pharmacy cod prednisone prednisone overnight prednisone without prescription cod prednisone without prescription shipped overnight express prednisone mastercard how to buy Paxil online without a rx how to order Paxil online without a prescription purchase Paxil online without prescription buy Paxil no visa online without prescription where can i buy Paxil without a rx Paxil free consultation fedex overnight delivery fedex Paxil overnight without a prescription buy Paxil amex online without rx Paxil without prescription overnight shipping Paxil online uk order overnight Paxil purchase Paxil without purchase online Paxil without rx Paxil fedex no prescription overnight Paxil c.o.d order Paxil online with overnight delivery order overnight prednisone canadian pharmacy accutane buy Flomax online no prescription where to buy cheap software software discounters discount software for government employees discount zone alarm software cheap pc software review tpa transfer pricing software buy masterwriter software discount bmi sesac price software development india software download shareware treo software download academic and software and discount save the cat software educational discount cheap ho9me design software discount financial software download mobile software software to stop impusive buying buy software for less keyloggers and buy and paypal not software nowbc westend order generic Orlistat game20for20imac Lasix no prescription overnight builder cheap buy xenical next day delivery xenical without a r x Maxalt usa Maxalt prices uk Valtrex generic Valtrex cash on delivery No presciption valtrex discount valtrex buying valtrex (no prescriptions needed for Buspar|buy Buspar with no prescription|online pharmacies Buspar|Buspar cheap|buy Buspar without rx|purchase rx Buspar without|Buspar purchase online|purchase Buspar online without rx|purchase Buspar free consultation|buy Buspar Online|buy Buspar american express|buy Buspar Online|buy cheap Buspar with dr. prescription|Buspar side effects|fedex Buspar without priscription|overnight Buspar without a rx|order cheap overnight Buspar|Buspar toronto|uk order Buspar|Buspar no doctors prescription|Buspar mexico|Buspar order|no prescription Buspar with fedex|order generic Buspar|buy Buspar without rx from us pharmacy|prezzo Buspar|Buspar 10mg|Buspar from canada|purchasing Buspar without a script|buy Buspar australia|purchase Buspar visa without prescription|online purchase Buspar|buy Buspar no perscription cod|buy Buspar drugs|buy Buspar with visa|buy Buspar without rx needed|buy Buspar without prescription|buy Buspar no prescription low cost|purchase purchasing Buspar without a script no prescription required Nolvadex buy cheap pharmacy Nolvadex usa windows server 2008 r2 enterprise x64 Lasix online prescription purchase cheap Flomax online 40 mg accutane buy effect Nolvadex wire transfer buy synthroid las vegas synthroid/thyroxine no prior rx low cost Nolvadex at Kentucky Avawam Buy accutane master card Lasix drug Lasix no doctors prescription buy zithromax cheap cod no rx purchase zithromax paypal without prescription Nolvadex overnight delivery fed ex Nolvadex 20 mg order Nolvadex prescription online buying Nolvadex online without rx buy Nolvadex d 20 buy 10 mg Nolvadex purchase zithromax no visa online without prescription purchase Valtrex overnight delivery order zithromax 100 mg visa buy zithromax 40mg fast delivery BUY zithromax COD purchase zithromax cod next day delivery buy 250mg zithromax mastercard buy zithromax online 500mg with mastercard cheapest finpecia available online Orlistat online order saturday delivery buy cheapest Valtrexbuy no prior prescription Valtrex buy Maxalt once a day Finpecia toronto order finpecia no visa buy herbal finpecia purchase maxalt amex online without prescription Valtrex without prescription shipped overnight express next day delivery on Buspar saturday next day delivery on Buspar saturday no perscription prednisone next day Buying prednisone online without a perscription discount valtrex purchase Crestor overnight delivery no prescripton Valtrex buy Valtrex no visa without rx free Zithromax order buy Zithromax online where can i purchase Buspar no rx buy mail order Valtrex buy online rx Arimidex without Cytotec without prescriptionwhere to buy Cytotec in brisbane buy Cytotec online india Lasix online without prescription adobe 8 install buy cheap Buspar on line Valtrex price Crestor online overnight delivery cod how to buy Prednisone without a prescription adobe acrobat ie helper adobe premiere elements 3 Proscar suppliers office 2007 student version order no prescription Crestor non rx cheap accutane 40 mg buy Tamsulosin canada Academic Software Discounts Photoshop For Sale Premiere Pro Cs4 wholesale valtrex cheap adobe web development adobe wikipedia buy Orlistat without a perscription how to buy Flomax without a prescription buy online rx Crestor without adobe reader japanese fonts Crestor on line buy Crestor on line law enforcement officers killed in 2007 buy in Orlistat uk Orlistat mexico adobe mac cs office proffesional 2007 Should I Buy Windows 7 software oem project buy Buspar with a visa buy Flomax 0.4mg blues and chili festival 2011 vancouver Microsoft 64 Bit Windows pinnacle tv center for windows 7 power director price Best Photo Editor Software best buy Valtrex purchase Orlistat without a prescription overnight shipping how to buy replacement windows buy Flomax canada mediavatar video converter professional key serial key windows xp sp3 oem buy Flomax visa microsoft works windows 7 downloads turbocad best price pro adobe cs7 3d studio max 9 buy purchase no perscription Crestor Fincar without prescription windows xp home oem edition product key cheap valtrex purchase Flomax no prescription cheap cheap sperry mega sale data buy adobe cs5.5 master collection mac cheap mac snow leopard song Valtrex without rx overnight shipping motion builder midi device price vs 2010 price buy cheap fedex Prednisone Flomax cheap quarkxpres 6.0 ddl how to purchase Buspar online without rxcheap Buspar no rx do you have to buy software for online courses buy Buspar toronto adobe template buy Tamsulosin cheap cheap generic Valtrex Valtrex without doctor prescription how to order Zithromax online without prescription buy Bupropion online cheap buy Amitriptyline diet pills buy Zithromax 500 mg buy Buspar without rx prednisone online buy saturday delivery purchase cheap online prednisone order overnight prednisone buy Arimidex without a rx Valtrex cheap Windows 2000 Updates Buy Windows Xp X64 Windows 2000 Programs buy on line Valtrex Adobe Creative Suite Master Collection 3 acon digital media acoustica premium 4.1.0.382 Orlistat tablets buy Cytotec in chicago Autocad 2010 Best Price valtrex online purchase Buy Finpecia 1mg with visa Buspar buy Prednisone fedex shipping buy Zithromax with amex windows security system purchasing accutane 40 mg online without prescription buy finpecia amex online finpecia wholesale Discount Microsoft WindowsLightroom 2 Windows 7Ms Office StandardPhotoshop Cs5 UpgradeComputer Monitors For SaleWindows Xp InstallSuite Microsoft OfficeAutocad Version 2007Adobe Acrobat 9.0 Standard DownloadIe8 Download For Windows 7Adobe Paint ShopMicrosoft Service Pack 2Free Download Adobe AcrobatStudent And Teacher EditionManage ImageAdobe Acrobat 7 Pro DownloadVista Home Premium To Windows 7 UltimateWindows 7 Home Premium Upgrade OemAdobe Creative Suite 5 Master Collection Student And Teacher EditionBuy Adobe Photoshop Lightroom 3Ms Office 2010 Home And StudentCompare Photo SoftwareMicrosoft Office Word Viewer 2010Windows 7 Upgrade Student Discount ProfessionalWindows 7 Updates DownloadCreative Suite WebAdobe Reader VistaMicrosoft Windows 7 Home Premium Upgrade 64 BitPhotoshop 2Ie8 Download For Windows 7Photoshop 2009Suite Microsoft OfficeMicrosoft Office 2007 VersionUpgrade Windows Vista To 7Autocad Lt 2010Autocad 2010 Best PriceDownload Acrobat Reader 8 hd tune pro buy Softmaker Office 2010 adobe acrobat pdfmaker Buspar ohne rezept paragon mac product key telecharger windows server 2003 .iso Valtrex overdose Prednisone without rx order Buspar pay pal online without rx where can i purchase Valtrex no rx buy generic Valtrex Valtrex drug online pharmacy Proscar purchase Proscar without prescription from us pharmacy fedex Cytotec overnight without a prescription order Cytotec without a rx overnight shipping is it legal to buy Cytotec from canada buy finpecia with a mastercard uk finpecia generic free finpecia windows xp gadget microsoft word to buy windows xp professional password adobe reader software finpecia ohne rezept cheap downloadable software microsoft cheap discount software windows email security window screens windows media audio to mp3 windows will not open victorian window microsoft vista ultimate price windows malicious buy cheap Orlistat under without rx Rosuvastatin tabletten buspar no doctor prescription windows lve discount microsoft software for students desk help software