Skip to content →

Tag: WAMP

12 steps to rebuild your WAMP server without losing your data

Like many people, I have a WAMP server on my laptop where I mock up new websites and run private websites as internal Wikipedia.

I am currently running WAMP 2.2 and it fails – a lot – three times in six months.  I have no idea why and each time the symptoms are different.

But I do know what the solution looks like. I need to restore long enough to be able to gain access to my database and back up anything that is not backed up and to set any unusual settings to defaults so I can think about an alternative.  But first I must restore WAMP without losing my website files (www) and the databases which are stored in bin.

Here are the steps.

Step 1 Backup your WAMP folder

Simply copy your WAMP folder into C:/ .  Windows will keep it as Wamp – Copy.

Have a break and calm down. This might take an hour or so depending on how much is in your database bin and www folders.

Step 2 Print out your passwords and permissions

Try to recall your user, host, password table.  If you can log in to phpmyadmin, you will find it there under users.  If your can access your mysql console, open it; ignore the password; and type

Select user, host from mysql.user;

The table will show you your usernames and hosts but not your passwords.

Note well that if you are an organized person, this is a table that you might want to keep on hand for emergency purposes.  But right now we will proceed assuming that we cannot quite recall what we did when we set up WAMP.

Write down what you can remember and do it now before you start guessing and create chaos later.

Step 3 Print out all the files that you might have edited when you set up WAMP

  1.  wamp/apps/phpmyadminVerNo/config.inc.php (this is where you put your user name and password and where you might have set up authentication and ports)
  2. /wamp/wampmanager.tpl (you might have changed http://localhost to http://localhost:81 if you have changed the port for apache from 80 to 81  three places)
  3. /wamp/bin/apache/apacheVerNo/conf/httpd.conf (if you changed the above, you will also have changed Listen 80 to Listen 81 and localhost:80 to localhost:81)
  4. /wamp/bin/mysql/mysqlVerNo/my.ini (you might have changed the port for myql from 3306 to 3307 – three places)
  5. /wamp/scripts/testport (where you might have changed 80 to 81 in several places)
  6. /wamp/lang/English (where you might have change Port 80 to Port 81)

Also write down the Version Numbers for Apache, MySQL and Phpmyadmin.

Check whether your computer is 64 bit or 32 bit.

You are now ready to start restoring WAMP.

Step 4 Download the correct version of WAMP

Find WAMPSERVER on the internet  and download the correct version of WAMPSERVER.  Don’t be tempted to upgrade while you are restoring.  Keep the task manageable.

Step 5 Uninstall WAMP

Go to your Control Panel (from Start) and uninstall WAMP.  Uninstall removes everything except your www and bin folders.

Step 6 Install the correct version of WAMP

Install WAMP.  I use all of the defaults (IE and dummy email).  If I need to fix my email, I do it in a separate exercise.

REMEMBER to enable the rewrite module in Apache. Go to the WAMP menu, Apache, modules.  Click on rewrite. And close. Then check again. Sometimes the “tick” doesn’t stick.   If you don’t enable rewrite, your websites will not be able to read “pretty urls” that you carefully set up for humans to read and you will get baffling errors.

Step 7 Let WAMP start

When WAMP asks, let it start itself up.  You will see the icon in your bottom tool bar and it should go GREEN.

Step 8 Check you have access to localhost

Got the WAMP menu and check you have access to localhost – that is the list of your websites in www.

If your config.inc.php file shows a password (see Step 3), then you don’t have access to Phpmyadmin – fix that in the next step.

Step 9 Fix your password in config.php.inc so you have access to phpmyadmin

Got to your config.inc.php file (see Step 3). If it differs in format from the one you printed out, then you have installed the wrong version of WAMP. Close all services, exit and start again!

If you have the correct version, then change your user name and password. If you have changed your ports, then do nothing else right now.

Stop all services and restart all services (from the WAMP menu).

Check you have access to phpmyadmin.  If you get a pink error message #2002 or #1045, then in all likelihood, you have put in the user name and password incorrectly.  But sometimes you have little choice but to try to reinstall (start again).  In short, at this point, you should have access to Phpmyadmin and clerical error or confused working procedures is a more likely cause of failure than anything more complicated (Don’t google  it. That is like looking for medical information – you will just panic. Calm down and work systematically.)

If you have access to phpmyadmin, you should be able to access your user table.

Steps 10 & 11 Access a website

Now go to localhost and access a website. If you did not change your ports, everything should work fine.  All done.

If you did change your ports, you have one of two options.  Change the port settings on your websites to match the defaults.  Or, carry on and edit all the files that you printed in Step 3.

To change the port settings in Drupal, the port setting for mysql is in /www/sites/all/default/settings.php. You have to go to Properties with a right click and change from read-only. Change the port to the default of 3306.  Save and set the Properties back to read-only.  Remember you will have to do this for every website.  Also remember if you test this on one website and then go on to change the port settings, come back to change the port setting to the new number.

If you have edited all the files in Step 3,  then this time stop all services, exit and restart WAMP and then all services because you have edited the menu as well as the services you call.

If all goes well, you should be able to access all your websites.

Step 12 Consider changing your server

WAMPSERVER 2.2 seems unstable to me. I don’t know if 2.4 is anybetter.  What I do know is that the config.inc.php file in WAMPSERVER 2.4 is radically different from the one in 2.2 and I cannot see how to update the ports.

Also the version of mysql is different which requires an undate of your data tables as well as your software. To upgrade, you might do better to treat the job as a migration and back up all your websites and all your mysql, rebuild your server and then rebuild your websites.

 

There you go –it might take you an hour to get back into action. If anything goes wrong, it might take several hours. But don’t panic.  The web is littered with half instructions and panicky notes.  Don’t go near them.  Just work very systematically. Check as you go so that you don’t cause more chaos. And everything will work.

6 Comments

How to import large files into phpmyadmin and WAMP

One of the more infuriating problems that you will encounter with WAMP is that it will refuse to  import an SQL file.  Too big, it says.

Google this problem and you will learn that it is down to phpmyadmin and that there are three possible ways forward.

  1.  Adjust our php.ini settings to allow a larger file
  2. Use the command prompt to run mysql.exe commands
  3. Edit the .sql file

There is a fourth way forward that is so much simpler.  Hat-tip to this UK web developer.

  1. Go to c:/wamp/apps/phpadmin3.5.2
  2. Make a new subfolder called ‘upload’
  3. Edit config.inc.php to find and update this line: $cfg[‘UploadDir’] = ‘upload’

Now when you import a database, you will given a drop-down list with all the files in this directory.  Chose the file you want and you are done.

Note though, that you only set up this procedure once – at the time you set up WAMP.  So you will forget this procedure!  That is why I have put it on my blog.

Another note to myself – if I have not checked rewrite_module in Apached modules, I should do so now. That is the other modification to the standard install of WAMP that gets forgotten.

 

 

One Comment

How to change the port numbers on WAMP and stop conflicts with a portable server

To install WAMP on your PC

What is WAMP?

WAMP stands for Windows Apache MySQL Php. 

·        Windows is your operating system.

·        Apache is a server that manages communications between computers on a network including the internet.  All websites reside on a server somewhere.

·         MySQL is a database to hold the contents of a website. A website is made up of two parts: its database and its programmes such as PHP

·        PHP is a programming language.  The language resides on the server and the website is written in PHP.

When do we use WAMP?

Anyone who develops websites, including their own blog, is likely to want to install WAMP on their computer.  If they don’t use Windows, then they will be looking for LAMP or MAMP.

WAMP is installed in folder on your C:/Wamp.

How do I use WAMP?

 To start WAMP up, you go to Start/All Programs/Start WAMP.  You may have to give it permission to bypass your firewall.

WAMP has a drop-down (or pop up menu).

You pick “local host” to see a list of websites residing on your WAMP.  Pick any of these and the website should appear in your browser (i.e., Firefox, Chrome, Internet Explorer, etc.)

Alternatively, you can go to your browser bar and type “localhost/mywebsite” [without the “”].  If you are a noobe, note that is an alternative to http://www.mywebsite.com.

If WAMP is running, and “mywebsite” exists, then mywebsite will open in your browser.

In short, you are running a private little internet on your computer and you can see your website in your own browser.

How do I install WAMP?

1.       Download the latest WAMP (first recall whether you have a 64 bit or an older 32 bit machine)

2.       Follow the instructions

3.       Have a look at the menu bar and see localhost, phpAdmin, Apache and MySQL.

Build a website

To build your first website, use WindowsExplorer to make a new folder in c:/wamp/www/mynewwebsite.

Check that you can see the folder when you use WAMP’s menu and choose localhost.  This folder is still empty and in two steps, you will download into it WordPress or Drupal, or whatever you are using.

First, make a new database for your website by going to phpAdmin.  Make a new database and then add yourself again with a new name and password (and name that is not root).  Give yourself all privileges.

Now you can download and install something like WordPress into your folder and when it asks for your database, give it your database name, your new user name and your password.

When you return to localhost and select mynewwebsite, you should see your website in your browser.

WAMP won’t run – port in conflict?

You very likely have Skype running on your computer as well.  Skype “listens” to the same port as WAMP but listens to another as well.

To resolve the conflict, open Skype and look for the technical settings. Uncheck “listen to port 80” and WAMP will work.

WAMP conflicts with another server on your computer?

You may be running ScholarWriter, for example, on Uniform Server and you will find you have to switch off UniformServer before you run WAMP, and vice versa.

You might also be running Maven with Eclipse to run UseCaseTool (uctool).  Maven is also a server. 

You might also have a GeoServer running!

You want WAMP to listen to its own distinct port and you also want MySQL to have its own port.  We will change the port in WAMP from 80 to 81 and in MySQL from 3306 to 3307.

We will accomplish these changes in this order.

1.       Edit Apache’s httpd.conf file

a.       Go to WAMP’s menu and select httpd.conf

b.      Use find to find localhost and change it to localhost:81

c.       Save

2.       Edit c:/wamp/wampmanager.tpl file so the WAMP menu points to localhost:81

a.       Find http://localhost and change it to http://htttp:localhost:81

b.      Three instances

c.       Save

3.       Edit MySQL my.ini file

a.       Go back to the menu and follow MySQL to my.ini

b.      Find 3306 and change it to 3307

c.       Save

4.       Edit the phpAdmin config.inc.php file to recognise the 3307 port

a.        Find the config.php file at c:/wamp/apps/phpadmin…/config.inc.php

b.      Edit out the first reference to localhost against verbose to leave ‘’ with nothing between them – I don’t know why but until I changed this I couldn’t go from the WAMP menu to phpAdmin

c.       Change the next reference to localhost to 127.0.0.1 – apparently if that remains as localhost, then the port defaults to 3306

d.      Change the port from ‘’ to ‘3307’

e.      Save

5.       Restart the WAMP server

a.       Shut down all services

b.      Exit

c.       Restart

d.      And test all the links in the menu

If all is well, you are now directed to both localhost:81 and localhost:81/phpAdmin where you can set up new databases.

Change the port settings on any existing websites

Note that if you already have made a database before you changed the port AND installed a website, then you must change the settings on the website. 

For each website, go to c:/wamp/www/websitename/sites/default/settings.php and edit these lines to match the port settings as follows

     ‘host’ => ‘localhost:81’

      ‘port’ => ‘3307’

Final test

Fire up another server, say a portable website and see if you are able to run two servers on the same PC.

And not least change your password

Your server resides behind your firewall and is not accessible from the internt.

But, just in case, change the password for the user ‘root’

1.       In PhpAdmin, change the password for user root under Privileges

2.       Go immediately back to the config.inc.php file and insert the same password in password.

3.       Reboot your WAMP and just in case you are exposed to the internet, no one should be able to connect to your MySQL without knowing your password.

At last, you should have WAMP running smoothly on port 81 and 3307 while other servers (and Skype) run on other ports.  I have deliberately left port 80 and 3306 clear for a portable server that so the defaults are used for users who are likely to have the greatest disinterest in tweaking their system!

16 Comments

Install Drush on WAMP slowly but successfully

I am presently building a website based on Drupal using my WAMP server on my laptop as a development site.

In these notes, I record the rather frustrating task of installing DRUSH. Drush is a facility for automating repetitive tasks involving in clicking together a Drupal site.   In particular, I wanted to simplify the tedious process of downloading and implementing all the modules needed to create a website.

Where I start from

These notes begin when two important stages have been completed.

Completed: Install a Wamp Server on your laptop.

Completed: Use a 5 minute install to create a Drupal site.

I am also assuming email has been set up for your development site and that you have looked around sufficiently to find the Modules tab at the top of the page.

It might be useful to install and activate one Module by hand so you appreciate the timesavings involved in using Drush.

Getting oriented: check your file structure

It is also helpful to look at your file structure before you begin.  I have WAMP stored under c:wamp and I store useful tools that I have downloaded from the internet at c:tools.

Each of my websites is stored in c:wampwwwwebsite1, c:wampwwwwebsite2, etc.  If the website is based on Drupal, then Drupal is placed in the website folder.  This means I may have more than  one copy of Drupal on my laptop. That strikes me as inefficient, but that is my set up at present.

Find Drush and gnuwin32 online

To get Drush, working, locate the Drush site through Google and download version 5 (not 4 – it doesn’t work  on Windows) to a folder called Drush under c:tools.

Now find gnuwin32 using Google and download the following using whatever setup.exe there are.  Gnuwin32 will give you Unix commands.  Download the following into your Program Files (x86).

  • Libarchive
  • Gzip
  • Wget
  • Gtar
  • Bsdtar

An extra step

I found advice to copy bsdtar.exe onto tar.exe.  No feedback occurs at all so it might be idea to run through the whole setup and if you have trouble, come back to do this step.

Adjust your path statement

Now adjust your Path statement (very carefully).  Adjusting the path statement allows you to call Drush from c:tools and for Drush to call PHP and SQL from WAMP and to use the Gnuwin32 commands.

Practically, open Word or a text editor, and then open Windows Explorer.  Go to c:toolsdrush and confirm that you can see the drush.bat file.  If so, copy the path, e.g., c:toolsdrush from the browser at the top of the screen to the text editor and add a semi-colon (;).

Now do the same for the other critical components.

  • C:Program Files (x86)Gnuwin32
  • C:Program Files (x86)Gnuwin32bin [where gzip hangs out]
  • C:wampbinphpphpn.n.n [whatever numbers you have]
  • C:wampbinmysqlmysql.1.36bin

You should have a long line of paths separated by semi-colons(;).

Now find your path statement. Go to Computer/Properties/Advanced/Environment Variables and be very careful. Messing this up can mess up the entire system.  It is also hard to see what you are doing.

Make sure the current Path Statement ends with a semicolon (;).  Copy the extra paths from your text editor and save.

Test the installation of Drush

Get your Command Line (got to Accessories) and check whether all is well by typing “drush status”.

If all looks sensible, then you are ready to download another module.  First, go to Windows Explorer and add a subdirectory to your website as follows.

c:wampwwwmywebsitenamesitesallmodulescontrib

Then use the Windows Command Line to work within this new directory.

  • Cd c:wampwwwmywebsitenamesitesallmodulescontrib

Then

  • Drush dl module
  • Drush en –y module

Conclusion

When you log in to your website the module should be installed and activated, saving you a lot of effort.

Just remember to use the CLI to work within the subdirectory so that Drush downloads here and not elsewhere.

Check out Similar Posts

One Comment

How to set up email with WAMP

Development sites and production sites; host and local servers

When I develop a new website, say for my blog, I set up a mock version on my laptop. In techy-speak, I am using a “development site” on a “server” on “local host”.  When the website is ready, I move it to my hosting service (in my case Dreamhost in the US). That is my “production site” and the website will thereafter physically reside on their servers and they will be the host.

Set up WAMP

I use a standard laptop to develop my websites. This one has Windows 7. My last one had Windows XP, and so on.  To set up my local server, I download WAMP.  As I only download WAMP when I have a new computer, I follow the instructions on LifeHacker, which are very clear.

Basically, I arrive at an arrangement where I have

  • A directory in C: called C:wamp
  • A program under C:ProgramFiles called WampServer where I can fire up WAMP (I leave WAMP off when I am not using it)
  • Within C:wamp is C:wampwww where my websites are stored
  • And within WampServer is access to localhost, PHP and MySQL.  PHP runs the server and MySQL sets up databases to store blogs.

It is all rather baffling at first but set aside a quiet Sunday afternoon and work methodically.  You will manage fine.

Set up email for a development site on WAMP

This post is about setting up email to work with a development site. I never bothered to set it up for my WordPress mockups because I already knew how WordPress worked and I could fast forward in my mind to what the production site would look like.  But yesterday, I downloaded Elgg to develop a social network and I really wanted to test the email functionality.  So this is how I set up email functionality for WAMP.

The basic principles are that I downloaded an email service called sendmail and I edited my PHP.ini file.  Both are easy and I will go into the details just now. This paragraph is to record an important point.  The set up changed the default email in the PHP.ini file. This is why that matters.  It is highly probable that each development site has a different email address.  The solution in this email assumes that the same email address is used with every site.  Either use the same email address for all your development sites or remember to change the sendmail.ini each time you change sites (and possibly the php.ini as well).  Whatever, don’t be surprised if something breaks. This could be the cause.

How to set up email for WAMP in three steps

#1 Download sendmail into a the c:wampbinsendmail

You will know you are in the right place because  bin has directories for PHP and MySQL

#2 Edit sendmail.ini in a text editor

I linked to a gmail account so at the date of writing (April 2012), look for these lines and fix them accordingly

smtp_server=smtp.gmail.com

smtp_port=587

smtp_ssl=tls

auth_username=youremailaddresses@gmail.com

auth_password=youremailpassword

NB I am using an email address that works with Google Apps so the gmail.com in my email address actually read myname@mydomainname.com

Save!

#3 Edit your php.ini file

On my version of Windows 7, I start my WampServer by finding it on the All Programs list. Then I look on the bottom tool bar for an upward arrow.  I activate WAMP with the big W.  Once it turns green, I can find everything that comes with WAMP.

I select PHP and open PHP.ini in a text editor.  I find “mail function” and I will now edit it out all mail settings AND add a path directing WAMP to the sendmail that I just set up.  These are the important lines.

[mail function]

; For Win32 only.

; http://php.net/smtp

; SMTP =

; http://php.net/smtp-port

; smtp_port = 25

 

; For Win32 only.

; http://php.net/sendmail-from

; sendmail_from = an email address that is already there

 

; For Unix only.  You may supply arguments as well (default: “sendmail -t -i”).

; http://php.net/sendmail-path

sendmail_path = C:wampbinsendmailsendmail.exe -t

 

; Force the addition of the specified parameters to be passed as extra parameters

; to the sendmail binary. These parameters will always replace the value of

; the 5th parameter to mail(), even in safe mode.

; mail.force_extra_parameters =

In short, make sure all the lines but one start with a semi-colon and copy the path line above.

Save!

And restart your server by pressing the arrow on the tool bar, selecting W, and “restart all services”.

Done

Now test your email service. You should be able to send an email from Elgg (or any other service). So try it – send an email from your development website (the email address does match what you put in sendmail.ini, right?) to another of your email addresses and go to see it it arrives within seconds.

Done!  You have set up email functionality in WAMP.

Make your own notes so you can do it again. And importantly, recall what you have done when you move to a production site or start another development site.  Write your own notes!  It only takes a few minutes!

CHECK OUT SIMILAR POSTS

48 Comments

Stop links breaking when you move your site from WAMP to your hosting service

Links break when you move your site from WAMP to your hosting service?

The solution is to set up a parallel Virtual Host on WAMP so that http://mysite.localhost redirects to the default http://localhost/mysite (where mysite is the name of your site).

Three steps to set up a Virtual Host and solve those broken links when you move from WAMP to your hosting service

#1  Get oriented

  • You will only able to see your WAMP based site in your browser after you have turn on your WAMPSERVER by going to Start/All Programs.
  • Look where your files are stored by going into Windows Explorer or My Computer.
  • Look at your C://wamp/ folder
  • You will see c://wamp/www where you store all your websites (right?)
  • And c://wamp/bin/apache/conf/ folder where you see a file called httpd.conf
  • Look at your C://Windows/ folder
  • Track to c://windows/system32/drivers/etc folder where you see a file called hosts
  • Inside the httpd.conf folder, we will list Virtual Server for each (and every) site that we are developing on WAMP for later export to a hosting service
  • That means you should edit this file every time you start work on a new website and clean it this file when you finish work on a website and remove it from your laptop.
  • Inside the hosts file, we are going to tell Windows (as distinct from WAMP) that when it sees a reference to mysite.localhost, it should redirect/loopback to 127.0.0.1 which is the IP address of your computer (and mine when I am working on mine.)
  • Windows 7 will stop you editing this file and we must work around that restriction.
  • Of course, you must do this for every site you are working on and remember to clean off what you no longer need at the end of a job.

#2  Set up your Virtual Server

  • Go to the httpd.conf file and open it in a text editor (Notepad or Wordpad)
  • Look for the line that reads: Servername localhost :80
  • Add the following text below this line.  Substitute your sitename for mysitename and remember to duplicate the last four lines for each website that you are working on

 NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot “c:/wamp/www/”
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot “c:/wamp/www/mysitename”
ServerName mysitename.localhost
ServerAlias mysitename
</VirtualHost>

  • Save as httpd.conf (don’t forget the extension)

#3 Tell Windows to redirect from mysitename.localhost to 127.0.0.1

  • Windows 7 will discourage you from editing the hosts file.  This is your workaround.
  • Go to Start and type in Notepad
  • Right click Notepad and open as Administrator.
  • Track to the hosts file (see #1) and open the file.  You may have to change the setting from Textfiles to All Files.
  • Look at the last line. It probably reads 127.0.0.1 localhost.
  • Add another line reading 127.0.0.1 mysitename.localhost
  • Close and save

Check you are redirecting your site successfully

  • Confirm nothing is broken
  • Go back to WAMPSERVER (look for the W, bottom right on the task bar)
  • Select localhost
  • Open your website and others too
  • Close the other tabs so there is no confusion
  • Enter the link above.
  • Everything still working?
  • Prove your redirect works
  • Shut all the tabs
  • Does your site open correctly?

 

Set up links that don’t break when you export your site

Now you can set up all your links without them breaking when you move your site.  Hmm. . . not sure this is the last word here.  I suspect the format is important.

 

CHECKOUT SIMILAR POSTS

Leave a Comment

5 minute install of DRUPAL on WAMP

Install Drupal with WAMP

Situation: To develop DRUPAL on my laptop

I want to download DRUPAL onto my laptop so that I can develop DRUPAL websites on my laptop before I load them up to my hosted server accessible by the public.

I already develop WordPress and Wikis on my laptop and with a local server WAMP.  I got the instructions to download WAMP from Lifehacker.

Mission: A 5 minute install of DRUPAL on WAMP

I want to download Drupal and set it up successfully.

Execution:  Critical steps for downloading DRUPAL quickly and successfully first time

#1  Check my directory structures

  • C:WAMP
  • C:wampbinapached
  • C:wampwww. . . .[all my development sites]

#2  Make  a directory to receive DRUPAL

  • C:WAMPwwwmynewsite

#3  Start WAMPSERVER

  • Go to Start/All Programs
  • Active WAMPSERVER (my installation asks me to confirm permission)
  • Look for icon in the bottom right of the task bar (W)
  • Check options ( localhost, phpMyAdmin, PHP which includes php.ini)
  • Go to localhost and see the folder you create “mynewsite” (though there is nothing in it yet)

#4  Set up my new SQL database

  • Go back to the WAMPSERVER menu (W) and select phpMyAdmin
  • Look in the middle of the page for Create database
  • Insert the name of the database.  I usually use the name of the website. Hit Create
  • Check your privileges.  If you set up your WAMPSERVER using the instructions from Lifehacker, then you will have two root users and yourself and all three users have global privileges.  Note your username (!) and recall your password.  You will need them shortly.

#5  Download Drupal and unzip it into your folder : c:wampwwwmynewsite (or whatever you called it)

#6  Install Drupal

  • Go back to the WAMPSERVER menu ( W on taskbar bottom right)
  • Select localhost
  • Select “mynewsite” (or whatever you called it)
  • You should be looking at the Drupal installation screen.

#7 Activate the DRUPAL installation programme

  • Select standard install
  • In English (assuming that is your preference)
  • Leave the selection as SQL
  • Insert the name of your database
  • Insert your username (see step 4 above)
  • Insert your password
  • Let DRUPAL do its thing

#8  Now do as DRUPAL asks and put in the email address, admin name and password for the website

  • NB These are not the same as the database in steps 4 and 7.

#9  Go to configuration

  • Make sure “clean urls” (pretty permalinks) is ticked.

Confirmation

I now have a working DRUPAL website accessible through my WAMPSERVER/local host or through my browser http://localhost /mynewsite and in under 5 minutes.

It’s ready for tweaking and development prior to being loaded up to a hosting service for public use.

CHECK OUT SIMILAR WEBSITES

2 Comments

Two Important Tips when using WordPress on a local server like WAMP

How to use WordPress on your laptop

Some basics first.  Beginners use the free, hosted WordPress blogs on www.wordpress.com.  The next step up is to self-host your blog by using free software from www.wordpresss.org at a self-hosting service whom you pay around USD10.00 a month.  The hoster, such as Dreamhost host a lot of WordPress blogs and will set up the basic shell for you within about 10 minutes.

If you want to be a  little bit more ambitious and make or edit your own theme, then you can turn part of your own computer into a self-hosting service.  The first step is to download  WAMP (assuming you use Windows).  WAMP gives you an Apache server, mySQL databases and PHPadmin.

All you do to get everthing running is

  • Download WAMP into a directory c:/wamp (follow the download instructions)
  • Set up passwords for root and IP 127… at PHPadmin activated following WAMPserver in Start/All Programs
  • Use Windows Explorer to go to c:/wamp/apps/PHPadmin and edit your password the config.inc file

$cfg[‘Servers’][$i][‘auth_type’] = ‘config’;
$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = ‘yourpassword’;

  • Set up  a new database ready to receive your wordpress.
  • Make a new directory under c:/wamp/www and upload an up-to-date version of wordpress from wordpress.org
  • Edit the config-sample.php file following instructions at wordpress.org

Two important tips to using Wordress on Wamp

  1. When you edit the config.inc file for WAMP save it using the Save As command.  Just closing the file updates the text but throuws up an error.  Not sure why but i wasted an evening on this.
  2. When you are working with a fresh installation of WAMP, go into into its menu box and make sure the module – rewrite is on.  If mod_rewrite is not on, you will not be able to use “pretty” permalinks.  Your wordpress will say you are using them but when you try to view the page, you will get an error because wordpress cannot find the page in mySQL even though it is on!

Two time-consuming obstacles that you can avoid!

Leave a Comment

Step 3: Get Ushahidi going in your community – install the code (about 1 hour)

Ushahidi

Ushahidi is the white label for Crowdsourcing Crisis Information.  It was originally thrown together to track electoral violence in Kenya in 2008 and its founders have made it available for all communities.

6 broadbrush steps for installing Ushahidi

I’m documenting what I am doing to get it up and running in non-geeky language – and hopefully clearly – but I am writing as I go. You are about to catch up with me.

Step 1: Download WAMP to turn your PC into a local server.  The instructions are on LifeHacker.  The rest of you computer is unaffected.

Step2: Get the code from Ushahidi

Step3: Install Ushahidi (looks complicated but an hour’s uninterrupted concentration will do you)

What you have already: WAMP

  • At this point you should have WAMP running on your computer.  You should see a little half-shell in your systems tray.  You will also have discovered by now that you must left click and select “Start all services” to make it work.   Go to Localhost at the top and you should see the wikipedia that you created.

What you have already: Ushahidi Code

  • You also downloaded the Ushahidi code.  Where is it?  Maybe you created a directory under c://wamp/www/ushahidi ?

Prepping: Set up a sub-directory in your server root directory

  • We will begin by making another directory to contain all the code for the website.  Think of your domain name and create a directory c://wamp/www/yourdomainname

Prepping: Create a database

  • This is the similar to the database you set up for your wiki.
  • Left click the WAMP ‘shell’ icon in the system tray and go to localhost.  Select phpmyadmin.
  • Look for the input form in the middle that says ‘Create a new database’.  Enter “yourdomainname” with the quotes.
  • Look for “privileges”. Select.  Check the privileges for both “root” and the “username” you set up for yourself when you made your wiki are to yes.
  • Check your database list. You should see yourdomainname there.
  • To keep yourself working smoothly, write down the name of the database, your username and your password.  These will be different from the name and password you get into the Ushahidi website.  (Think website and database as two separate places that speak to each other.)

Prepping:  Unzip the Ushahidi files

  • Now unzip the Ushahidi files into the directory it is in, or, into c://wamp/www/yourdomainname. It doesn’t matter where for now as long as you remember where you sent them.
  • This should take 10-20 seconds.
  • Now copy everything in the sub-directory Ushahidi into c://wamp/www/yourdomainname.  In geek-language, we are putting the code in the root directory.

Prepping: Check your PHP extensions

  • Before you go on, there are four little things you must check on you WAMP server. Left click on the shell, go to PHP settings and then PHP extensions.  Go down the list and make sure the following are “on”.  Mine are marked with an arrow: php_curl, php_mbstring, php_gdr, and php_mcrypt.

Prepping: Thinking about you website users

  • What is the name of your website?  Maybe it is the same as yourdomainname or maybe the label at the top left of the first page will be different?  You can have two names or you can use the same one.  This is choice about communication not a requirement within the Ushahidi platform.
  • What is the tagline for your website?
  • What email address will you use on the front page of the website for people to contact you?  It is visible so maybe set up a fresh gmail account.  You may have a second password now.  Write them all down!

Installing Ushahidi

  • At last! You are ready to install. Go to your browser (Firefox) and type http://localhost/yourdomainname/installer
  • Choose “basic” and we are going to fill in some information.
  • Ushahidi will have found yourdomainname and entered it for you.  If you want to change it (see 5 bullets up), then do that now.
  • Enter your tagline (required).
  • Enter your (very) public email address.
  • Now enter the name of your database (that you set up above).  And the username you use for databases and your database password (all set up on Step 1).

And you are done!

  • You should see a fresh installation of Ushahidi in your browser at http://localhost/yourdomainname.
  • Go to http://localhost/yourdomainname/admin (remember this for future login’s).
  • Enter admin for user and password (don’t forget these.  Why not write them down with the usernames and passwords for your email and your database?)
  • Well done!  You can explore now.  Don’t change anything yet.  You are tired and you might make a mess.  I did and had to pull everything off and start again.  Now is the time to think about what your new site is for and what you want it to accomplish.

HELP:  If you have got stuck, leave me a comment.  Within the limits of my competence, I’m happy to try to help.

Enhanced by Zemanta
7 Comments

Step 2: Get Ushahidi going in your community – get the code

Now the easy bit.  Get the code for Ushahidi.  Five minutes work and the possibility of a day or two elapsed time while you wait for the link.

  1. Go to the Ushahidi download website.
  2. Email Ushahidi saying why you want to use the platform.
  3. When they send you a link, download a zip file and store it wherever you store downloads.  Alternatively go to the C:\wamp/www directory that you made when you set up your local host, create a directory called c:\wamp/www/ushahidi and store the zip file there.

All done.

Enhanced by Zemanta
One Comment