Skip to content →

flowingmotion Posts

How to import large files into phpmyadmin and WAMP

Print Friendly, PDF & Email

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

7 steps to align your website with your business strategy or professional policy

Print Friendly, PDF & Email

Let’s imagine a professional person who wants a website, because these days we need a website, but who also wants the website to pay for itself – not only to recover the paltry fees for domain name and hosting charges – but also by becoming a useful part of their business.

What should go onto the professional’s website and how should they construct it?

Listed below are 7 considerations, none of which are specific to any one content management system (CMS) or framework though all consistent with Drupal, which is the framework that I am using a lot of these days.

#1 Domain name or url

Your domain name will be something like www.jojordan.org.

  • You will see there that I have used the name that I expect people would use if they were searching for me. You might also use the name of your business.  The principles here are
    • List the names that people might use to search for you and rather go bigger than go smaller. That is, try to include the smallest possible name in a bigger phrase than abbreviate a larger phrase into something meaningless.  Your goal is to have the “phrase” that you wish to be associated with you in your domain name in “black and white” so to speak. Why?  Because people want to find you; and because computers are rather stupid. They are looking for the phrase that people put into the search bar.
    • Also, note that I used .org as my extension. What is the best extension to use?
      • Convention is extremely important in naming.  The top level domain (TLD) begins with extensions such as .com, .org, .edu, .gov, .net These extension are the default for organizations based in the USA but are also to signify a global business.
      • .com suggest business or core.  .net suggests community. .org is something in between and is less popular than .com.  I used .com simply because jojordan.com was already taken and I didn’t want to buy it. So I settled for second best and .org seemed ok to me for what is really a “CV” or “resume” site – that is, for information and not for trading.
      • For my company, I really wanted a .com extension so I expanded the name of the site from Rooi to rooiventures.com
      • Many businesses want to be identified with a particular country. They will then prefer to use a country signifier such as .co.uk
      • New TLDs are coming out now and it is possible to book for a name such as www.outof.africa
      • To find out if a domain name is taken, try looking it up on a service like Domainr
      • You will also see that my name is preceded by the well-known www, though I am going to be asked later whether I want http://jojordan.org to resolve to http://www.jojordan.orgor the reverse.  The principles here are
        • To make sure that your website is set up to resolve to both versions
        • To make sure that one resolves to the other – I believe Google frowns on both being valid as that duplicates content and makes a headache for their spiders (if this is true, they will exact revenge by dropping you down their page rankings – or put another way, punish people who try to scam the rankings by publishing the same thing twice)
        • Simply make a choice and remember to check that your website is set up correctly.  In practice, you will not see the difference but the ranking spiders will
        • Find out where to buy your Domain name. Domainr will probably tell you but if you live in an out-of-the-way place, you might need to visit an office rather than simply make the purchase on line (oh yes, been there and done that).
        • Names are rented rather than bought and must be paid for annually or biannually – put the next payment in your diary! And keep the receipts – they are business costs and at least you don’t pay tax on them

#2 Set up a holding page

While you get your website sorted out, you can make that domain name work for you and start to acquire some experience in website management.

Set up a simple one page website using a contact form so that people can email you.

These are the issues you will be thinking about now.

  • Where will you host your site?  You want the hosting service to be cheap because nothing much is happening right now and you don’t want to be locked in to a long-term contract.
  • Your hosting site can be anywhere in the world but check that their server is in the same timezone as most of your customers. I have had a hosting service take my site down in the middle of the UK working day “for maintenance”.
  • Check that you can log into their cPanel and use phpAdmin to manage your site.
  • Initially, pick a host who offers one-click installs of WordPress or Drupal.
  • Make a MySQL database that will hold your website (I know there is not much in it right now but you are getting practice into the whole process)
  • Install WordPress or Drupal into it (takes 5 minutes)
  • Get some anti-spam set up (Akismet for WordPress and Mollam for Drupal)
  • Theme your site a little (download a free theme)
  • Add some basic information about who you are and a message saying “coming soon”
  • Set up a contact form and make sure the anti-spam is operating
  • For practice, set the backups so that you can import the content of your database (just about nothing right now) into a clean database, anytime, anywhere
  • Also zip and copy all the WordPress or Drupal files and have them emailed to you regularly so you can simply unzip them next to a refreshed database, point them to the database and have your site back running in minutes
  • Pick up the DNS server numbers from your host and go to the computer where you bought your domain name. Insert the numbers against your domain name so the domain name server (the place you buy names) points to the host (where your website sits physically)
  • For sack of clarity, you are gathering usernames and passwords at an alarming rate. This is what should be in your notebook
    • Domain name, place you buy it, annual fee and renewal data
    • Your user name and password at the place you buy your domain name and the email address that you gave them
    • Your hosting service, their url, your package, its cost and when you pay
    • Your username and password to log into their website to pay your account and the email address that you gave them (they should email you when they need a payment)
    • You may use these names and passwords to get to their cPanel where you do things like set up your database but you might be given another set too!
    • Your username and password for your MySQL database and the name you gave to the database
    • Your username and password and name of the website that you set up – these will be the no 1 account for your website with admin rights.  You can use these to log on to your website online and do set up tasks that are done from inside the website – like setting up the contact page
    • Your username and password at the spam service (and email address). They will give you a number to insert into your website to connect the two.
    • You can also set up Google Analytics now.  This involves
      • setting up an account with Google Analytics using another set of username, password but not email if you logged in with a gmail account.
      • Getting a code
      • Going back to your website (which still has one page only), logging in, and inserting the code.
      • Adding an EU cookie alert if you  are in Europe or expect to do much business here
      • Why should you set up Google Alerts now?  More practice, but to remind you to start developing name recognition. Use your url on your name badge at conferences; add it to your emails; add it your business cards; add it when you leave a comment on other people’s blogs.  Then you watch your traffic at Google Alerts – not much at first but often very weird indeed.

#3 Consider the tone of your website

Initially, we tend to design our websites through touch-and-feel. We google the web for designs and themes and choose on the basis of I like this or a I don’t like that.

To think more about what you are doing, consider the relationship that you will have with your users.

  • Are you going to be a chatty host being pleasant and nice and encouraging people to linger and leave comments to which you will reply?
  • Are you the organiser which draws people into a set of activities designed to move them from noobe to recognised expert in a specific community?
  • Are you a mentor recognising a community brought together by common values and interests?

Your relationship with your users will set your tone; your content will determine your design (colours and layout); and the activities on your site will inform the activity on your site and it’s underlying structure.

At this stage, you might rethink your “coming soon” page?  Now you are no longer befuddled by the internet plumbing, you can think about whether the tone of the page reflects your relationship; whether the look reflects your users; and whether the sign-up reflects your purpose.

For example, a more commercial site might allow send users a voucher to redeem in store; an organising site might send out emails in response to repeated logins to gain some kind of “level” while you get set up; and a community site might request your users to send you notices of events in their areas, or links to articles they have written, which you could share by email to all your users.

From the outside, your website is part of the relationship you have users and as you meet users in real life, you invite and involve them in this community.

#4 Basic services on your website

As you start to build your website, you will initially add some very basic services.

  • Add a privacy statement.
    • I have put the privacy statement here because Google cares.  Decide how you will look after the names and addresses, and for that matter, information about what people read and look at, and write a clear policy.  Put the policy in a “page”.  Later you will probably add a link in footer to this page.
    • Note that you might also be obliged by the law where you live to add something like an EU cookie pop up and to register with Data Protection.
    • Think it out now – these are your customers and you want to look after them from outset.
    • Add some basic information about your commercial operation
      • On another page, add the official name of your business, its registered address, its trading address, its company number if it has one, its VAT number if it has one
      • Your customers need to know whom they are trading with and what codes of conduct you have signed up to (Companies Act, Tax, etc).  You can assume your customers are knowledgeable and know what to look for but in brief – how do they contact you about formal matters?
      • How do your customers reach you to buy?
        • If you are a restaurant, where are you? Where can people park? When are you open?  What are your opening hours?  What do your customers want to know?
        • If your customers come to you, add a Google map.  You can add a printable version but don’t put in a bad map when Google can supply something better than they can use to check directions and transport.
        • Put some markers in for where your entrance is and where the parking is?
        • How do disabled people get to your front door?
        • How can people telephone you?
        • And even what can people email you about?  What do you promise to reply to?
        • Career advice
          • Do you employ people? And if so, who might want to work for you?
          • Do you work with people?
          • What is your advice for people getting started?
          • Bookings
            • What would you like people to buy from you?
            • In some businesses , this is an easy question to answer – in others less easy
            • Start at the end of the sale chain and think about what the final “order” will look like.  You may not be able to put that online, but looking at it and imaging it like a restaurant booking or a book purchase on Amazon will help you see how to structure your site.
            • For example, let’s imagine that you offer language tuition. You don’t have many students, but you imagine that some people sit at home and contemplate whether or not to buy your service.
              • You could put a list of times (and seasons, e.g., school holidays) when you do and do not offer  language services
              • You could put a list of “modules” e.g., travelling to X for the first time, going to a formal dinner, greeting your hosts
              • You don’t necessarily have to put up prices right now – just get started
  • If the purchasing of your services is very complicated, then you might like to start to educate your customers
    • For example, I learn Chinese and it would be helpful to put up some goals such as Level 1: Learn to speak 50 words in simple phrases like Hello and Goodbye, learn to recognise the phrases in Chinese characters and pin yin, and learn to write the characters.  Be able to show Chinese speaker you are willing to learn and be prepared to continue to Level 2 when you are ready
    • I am “showing” what the customer needs to think about to make their decision and when they are ready, they will come back.

#5 Putting together a fuller site

By now, you will have decided on a theme and you are probably using a free theme for WordPress or Drupal.  At this stage you are probably thinking about colour and fonts, mostly.

You will also have these pages ready –

  • A privacy policy
  • A formal business information page
  • The how to get to you which might be married with your contact form
  • Some basic pages about your services

You might also have some email traffic already and be checking Google Alerts and storing away your backups.

You can install your theme and add pages very easily.  Remember to keep your spam filter active!

You might also find your About page very easy to write now.  It does not need to be much but it should state clearly who you are. People don’t like dealing with Anonymous people on the internet.  Something brief and to the point much as you would say over the telephone if you telephoned a potential customer out-of-the-blue

#6 Social Media

You have probably heard the phrase social media or Web 2.0.  Web 2.0 is the web that “answers back”. So far, we have been using Web 1.0.  People can talk to you but they have to switch to email, or to the post, or the phone or Voice-over-internet like Skype.

We have also set up “pages”, that is, static content that does not change very much from one month to the next.  Moreover, when the content on the page does change, you take the page down the way you would rip off an old notice on a noticeboard and replace it with another.

Even on a page though, you can set “comments” as “on”.  I wouldn’t, as these pages are for information.  I would add a link and encourage people to email you.

But people like to comment for three reasons.  They have got used to commenting liberally on Facebook and Twitter.  They want their comment to be public for whatever reason (you may not appreciate the reason but that is another matter). And they leave the name of their own website – not only that others can see it but that Google can see it. Google moves sites up the ranking if they have lots of links to other websites.  So, many of the comments will but outright spam, and Google will penalize you if you don’t clean them up, but the links to real websites will boost your rankings.  Both commentator and host win.

Rather than use your ‘pages’ to move to Web 2.0, it is now time to activate a blog.  Your blog might look like a “page” but it is actually a pile of “posts”, ordered by date with the most recent on top.  It is here that you add information for your readers – remembering the relationship with them that you thought about in Step #3.

Look here at the lovely curation by Ilkut Terzioglu who does not write on about all the technical things he deals with daily. Here he adds visual and graphic things that he values and that will be interesting to his readers who also appreciate the visual and the graphic and the socially interesting.

In a sense, a blog is a newsletter but in nature of a feature column in newspaper. It becomes a resource for readers.

Web2.0 comes in because the top post of your blog changes often.  The others remain on your site but the top one changes. Google likes to see this.  Blogs almost always have their comments “open”.

And the blog should have an RSS feed set up (Really Simple Syndication). Basically, you should see an RSS button in your browser when you look at your url, or somewhere on your page.  Your readers should be able to pick up the url for your RSS feed and put it into a feed reader.  Why do we have this?  If we log on to our feed reader, it pulls the latest blogs from all the places we visit into one place and we don’t have to visit all these other places.  Actually, feed readers are going out of fashion (Google is shutting their service) and you encourage your readers to sign up for a copy of your blog by email but be careful to add an unsubscribe button so they can tell you to stop sending copies programmatically.

You can also use RSS to pipe your blog to other websites, like Linkedin, if you wish – don’t overdo it though.

As a last Web 2.0 measure, consider where you want your material to be advertised. Do you want links to Facebook , Linkedin andTwitter?  Do you want people to email your copy to others?  Do you want people to print easily?

Think through what your readers want to use your material for and make life easy for them?

And then think through the content of your blog.   What do you work on a daily or weekly basis that is useful to them?  If you are running a consumer type service, what information is helpful to them?  If you are helping people level up, what is most interesting to them?  If you are mentoring a shared community, are expert articles – written by yourself or others – what they want?  Ilkut’s visual blog is that – material shared with people who have the same values.  The key words here are “share” and “value”.

#7 Commercialise your site

Finally, we get to the nub of the matter.  Is this website part of your business or just a giant drain on your resources.

I hope that so far you see the value – your customers can find you, they can find out essential information such as your address, and the uninitiated can start to learn the basics – when are you open? What do they start to think about when they use a service such as yours?  You should be recouping your costs with these activities alone.

Commercialising your site is the big step up and to bring your website into your business as a significant player, I suggest that you think this process out.

Imagine a completely naïve customer – they have not hired you or bought from you, or anyone like you, ever.  What is going through their minds?  What confusion and muddle are they experiencing and what basic signposts can you provide to help them understand what is available to them?  What are the basics to understanding your world?

And then think about the end of the process, which I encourage you to think about in Step #4.  If we call the the initial muddle of a complete novice is Stage #1 (for the customer) and signing the final purchase order/contract as Stage #7, then can we work out the intervening five stages that a customer goes through as they gain sufficient experience and understanding to buy from us.

This is the kind of exercise that we want to do practically rather than theoretically, and also the kind of exercise that we don’t want to jump into as you might try if you came to this paragraph first.  Though you don’t need to go through all the website set up that I have listed, working through step-by-step brings us gently to place where we can understand what a customer goes through when they buy a complicated service – as they transition from a newcomer to an expert consumer.

This is the bulk of the work to bringing your website into your business as a major player. From that point, you can make your website much more interesting.  You will also start to use Google Analytics with more verve, too.  GA will tell you where people are landing on your site.  If rank newbies are hitting content intended for people around Stage 5, you can expect them to bounce off your site.  And you might adjust your site but adding a clear path from 1 to 7 that appears on every single page.

It is here that you provide a very significant pre-sales service where customers learn what is available to them in this world to make their lives better; and how to set about learning more and becoming more involved.

Once you have got this far, then you will become more demanding of the CMS that you are using, be it WordPress or Drupal, and the whole business of running your Website will become much more interesting and rewarding – both task by task and sale by sale.

I hope this helps and that these 7 steps help you understand what is involved in running a website.  I hope you feel confident to set about developing a website and copying with the internet plumbing.

And above all, I hope you are able to develop fantastic websites that help people discover your world and to benefit from it in ways that benefit them and bring them economic advantage.

 

2 Comments

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

Print Friendly, PDF & Email

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

How to remove hundreds of spam comments from a Drupal site

Print Friendly, PDF & Email

Suffered a spam attack on your Drupal site?  You are in good company. Even with Mollom installed, your site can be overrun faster than a dog with fleas.

To get rid of the thousands and thousands of spam comments, you have two choices.

Either, delete the comments from your MySQL database

To delete spam directly at your MySQL database, you will have to log in to your hosting service.  Then use phpAdmin to find the right table.  And truncate the table to clear out all the comments.

I haven’t tried this but proceed logically and it should work.

Or, delete comments from your front end using a View

  1. Install two modules: Entity API and Views Bulk Operations
  2. Clear your cache
  3. Make a new View at Structure/Views/ and use Comments as your content
  4. Leave the format as Unformatted and set the number of comments as 500 — check the pager
  5. Continue & Edit
  6. Change Content to Fields
  7. Add a Field for Bulk Operations: Comment and set the value as Delete
  8. Remove the filters unless you want them
  9. Save
  10. Go to the View (e.g., http:/yourwebsite.name/spam-control or whatever you called your view)
  11. Start deleting

You need two clicks at the top and you must confirm the list.  It takes a little time and it is probably quicker to delete the table but this was more satisfying and can remain in the background to clean up smaller spam attacks in future.

One Comment

Set up two instances of Uniform Server, each with several websites

Print Friendly, PDF & Email

What is Uniform Server?

Uniform Server, or UniServer, is server that you  load onto to your laptop, or desktop, so that you can develop websites off line.

Moreover, unlike WAMP and XAMPP and similar local servers, UniServer does not install itself on your machine (provided you run it as a program and not as a service – it comes with both choices).  You unpack UniServer into a conventional folder on a USB, e.g. E:/UniServer/all its files, or onto your hard drive C:/UniServer/all its files.

In practical terms, if you want to move your server and its websites to another computer, you just copy the folder to a USB and then copy the folder on the USB to the next computer.  You can also zip up the folder, copy it and unzip it into a new folder on the next computer.

The importance of Uniserver is that it is a local server, private from the internet, and completely portable. You can zip it up and move it from computer to computer without worrying about installing and rebuilding your websites all over again.

What is a multiple instance of Uniserver?

The instructions for running a multiple instance of Uniserver are a little confusing.

We have two things that we might like to achieve —

First, we might want to run two websites on one copy of Uniserver.  This is very easy and I will outline the steps below. Even if you only intend to run one website, it is worth setting up two websites just to explore and understand the file structures of Uniserver.

The second thing we might want to achieve is to run two servers. We might want to run two instances of Uniserver. Or, we might want to run Uniserver and Wamp, for examples.

The reasons why running two instances of a server is an issue is that when two servers run on our laptop or desktop, they compete for the use of ports. The default port for an Apache server is 80 and the default port for our MySQL server is 3306.  When we have two servers running on our computer, they both try to access the same port.  Indeed, when we first install a server, the server often clashes with Skype and we have to adjust Skype settings so it does not try to access port 80.

Multiple instances of Uniserver, in the way its documentation describes multi-instances, means being able to run two instances of Uniserver at the same time.  To do this, we will set one Uniserver to port 8s and 3306, and the second server to ports 81 and 3307.

[Note, on my computer, I set WAMP server to ports other than 80 and 3306 and leave the Uniserver on 80 and 3306 because I expect more experienced people to use WAMP and less experienced people to be using Uniserver.]

How do I run two websites on one instance of UniServer?

1 Unpack Uniserver and Run as a Program

Once you have unpacked UniServer into a folder, e.g. C:/Uniserver (make sure there are no spaces in the name), then go to the folder and run as a program.

2 Use the menu to Start both Servers

A big blue icon with a “1” opens in your tray and a little menu box opens on your screen.

Start BOTH the Apache server and the MySQL servers.

3 Change your password for the root user for MySQL and all your MySQL databases

As soon as you have started both servers for the first time, Uniserver asks you to change your password for the MySQL server. Do so now. Apparently you can do so later, but that has never worked well for me.

Confusingly, the current password is “root” – and so is the default username “root”.  Change the password form “root” to “mysecret” or whatever.   You now have a database called “mysql” with user “root” and password of “mysecret”.

4 Orient yourself by finding the database that you have just created

To see the database, look in the file structure for “usr” and keep tracking down until you find “mysql”.

5 Make another database, if you need it, or just make one to ensure you understand the file structure

If you will be running more than one website on your Uniserver, go to phpAdmin in the little menu box and make a new database for each website.  Each website will have a user name “root” and a password “mysecret” and they will each have a folder alongside the first database “mysql”.

If you make a database just to know you can and don’t really need it, you can tidy up by going to phpAdmin and deleting the database.  Confirm that its folder has vanished from the file structure.

6 Download Drupal or WordPress or something to run your website

If you are using Drupal, download and unpack the latest version of Drupal into a folder in C:/uniserver/www/your_new_website.  Check the files are in /your_new_website. If they are in one folder below, e.g. /your_new_website/drupal-7-22 then copy the entire file structure up one level to /your_new_website.

7 Download Drupal or WordPress again into another folder

If you are running a second website on a second database, unpack Drupal, or whichever CMS you are using into a second folder /www/the_second_website.  Make sure the file structure is in this folder and not one folder below.

8 Install the websites

Go back to the menu box for Uniform Server and select www.  You will see your two websites (or folders rather).  Select the first one and follow the install instructions.

Insert the name of the database, the username (root) and your database password (mysecret). Then add the details you will use to log in to the website when asked.

Do this for both websites.

You have now installed TWO websites  on ONE instance of Uniserver which is running on the default ports of 80 and 3306

To see your websites, type localhost/your_new_website into the browser bar. Note the name after the / corresponds to the name of the folder in /www.

How do I install two instances of Uniserver?

1 Unpack UniServer software into a second folder

To install a second instance of Uniserver, we unpack it into a SECOND folder such as C:/UniServer2/all its files.

2 Change the port numbers

We start as before with

  • Run as a program
  • Change the password from “root” to “mysecret”

Now, before we continue to do anything else, select “multiple servers” in the menu box.

You will see two columns: old and new. The new settings have incremented all the old settings by one.  Select the button at the bottom right that is partially obscured. This button sets this version of Uniform Server as port 81 for Apache and port 3307 for MySQL.

Also, notice that the icon changes from “1” to “2”.

When you are running Uniform Server “1”, it has standard port settings of 80 and 3306. When you are running Uniform Server “2”, called from C:/UniServer2/, then it has port settings of 81 and 3307.

3 Set up empty databases and download website software

You can make new databases using phpAdmin, as before.

You can also download your website software into folders in /www/website_1 and /www/website_2 as before.

4 Install your website software

But now there is another important change to what you do.

When you install Drupal (and probably other software such as WordPress), state the name of the database that you made in phpAdmin. Give the username (root) and password (mysecret). Then look at Advanced Options. Leave the host name as “localhost” but now add the port number. This is the port number for the database — which in our case is now 3307.

Note well, that we usually leave the database port blank and it reverts to the default of 3306. For the second server “2” (not the first server “1”) we need to fill in the number.

Do this and continue installing as before.

One more change: when you call the websites on the second server from the browser bar: type localhost:81/your_website_name. There was no need to type localhost:80/website_name for the first server because 80 is the default port.

Now you can run server “1” which servers a handful of websites and server “2” which serves another set of websites, at the same time, because they are using different ports.  And you know what to type in the browser bars.

Turn off your UniServers

When you are finished using a Uniserver, choose the correct icon (“1” or “2”), go to the menu box, and turn off both servers.

How to change the settings of Skype

If you have Skype running and your local server will not run, then log into your Skype and go to Tools/Options/Advanced/Connect and uncheck the box ,which says use Port 80 and 443. SAVE,

Skype functions perfectly well without Port 80 and the conflict with your server is immediately resolved.

Congratulations – you are able to install UniServer into two separate folders working on two different pairs of ports. And you are able to install multiple websites on each server and tell the website which MySQL server

One Comment

How to migrate your Drupal site in 3 steps

Print Friendly, PDF & Email

Migrate your Drupal site in 3 steps

You have a Drupal site on your WAMP, on your computer or you have it on one hosting service, and you want to move it to another.

Will this be hard?

In this post, I will describe the concepts of moving your site.  I’ll also tell you how to connect to a remote hosting service so you are not driven made by your FTP disconnecting on you.

Understand what you are doing

A website is made up of three parts:

  • The content management system, such as WordPress or Drupal.
  • The underlying MySQL database
  • And some code pointing one to the other.

 

  1. You need to move across all the files of the content management system (CMS) (WordPress or Drupal) from your old service to your new service.
  2. You need to create a clean MySQL database on your new hosting service and transfer across the contents of your MySQL database from your old service.
  3. You must point the CMS to the database (Note WP users – I think you have to point your database to the CMS – so look out for that).

Get the software to manage the interhost transfers

You need software to move the CMS and MySQL around. You can use an FTP like Filezilla to transfer your CMS – but it will take forever.

Rather download Putty and it extra functions and use psftp to transfer the files.  I’ll come back to this later.

If your MySQL database is not too big, you can use PHPAdmin to download and upload at both ends.

Let the internet know what you are doing

You also must make sure that your DNS are pointing to the new site.  What this means is that you must know the DNS of the new hosting service and you must go to the place that manages your domain name and put in the DNS numbers.

It usually takes 4 hours to propagate and for re-direction to take place.

Step 1:  Move your content management system

If you are moving from WAMP or a local server on your own computer, go to www, find your website, and zip up everything – everything – in the folder.

Establish that your hosting service allows you to use ssh access and psftp. If they don’t allow you, move!  And, ask the next service whether they give your free ssh access before you join.

Once you have established ssh access, then you will need to do three things:

  • Get your host’s address which will take the form of servername.hostname.com.  Find out what it is and write it down.
  • Note your ssh username and password. These will be different to the ones that you use to log in to the commercial side of your host and to your website. They will also be different to the one’s you use for the MySQL database.
  • Get Putty and psftp onto your machine.  Put them in a folder such as c:/tools and run them from there. Make your life easier by moving the .zip file that you made above into the same folder.

To use psftp, simply click on it, give it your host’s address and supply your username and password when asked. The password gives no indication it is receiving your input. Don’t panic. Just be careful.

When you are “in”, use ls to list what is in your directory. If you are in the right place, upload your file by typing “put c:/tools/yourfilename.zip”.  Let psftp run. It takes time but at least you won’t be timed out as you will be in Filezilla.

When psftp is done, you will get the cursor back > and your unzip your file with a simple “unzip yourfilename.zip”.

Another hint: if your website is called mywebsite.com, call your zip file mywebsite.com.zip so that it opens neatly into a folder called mywebsite.com. Otherwise, remember to rename your folder with your domain name.

Your content management files are now ready and waiting but they won’t work yet because you have no database.

Step 2:  Move across your database

The first thing to do now is to go to your new hosting service and figure out how to set up a clean MySQL database.

Note carefully the name that it is given, the username, and the password.

Also, hunt around for Drupal installation instructions. Specifically, you want to know what you must call your host.  I have one hosting service that uses “local host” and one that requires something like “mysql.websitename.com”.  Find out and write it down.

Then go to your old hosting service and use PHPAdmin to export your database.  This is a three step task.  A) Find the database.  B) Export . C) Set the name and the compression type. D) Go.

But there are TWO complications. First, you are given a choice of format. And some hosting services accept some formats and some others.  The easiest way to find out is probably to make a mistake.  So export. And when you find you need another format when you are importing, then start again!

The second complication is that the export procedure may add a CREATE database command that will trip the import.  You can edit this command out of hand but there is a way to avoid the hassle.

When you export, there are two procedures.  If you select Databases from the horizontal menu, a box comes up which lists all the databases and you choose one.  This method puts in the unwanted CREATE command.

If you choose your database on the extreme left, all its contents are listed. Then choose Export and select all the tables. This procedure does NOT insert the unwanted CREATE command.

Now you have a MySQL file (in the right or wrong format – you will discover soon), got to your new hosting service, find the PHPAdmin, select your clean, new database and IMPORT the MySQL database. Wait a little while and you are done.

For clarity, you DO NOT NEED to reconcile the database names, and usernames on the two computers. That is coming next. For moving the database, you can call yourself Charlie on one and Mary on the other. That is no problem.

Step 3: Point you CMS at your database

As a last step, you need to edit your settings.php file which is under sites/all/default.

This is a read only file – so your first step is to give yourself access.

Then scroll down the file until you see the database name, username, MySQL password and host name that you used on your old system.  Change these to the database name, username, MySQL password and hostname for the new system.

Note these are not the names you use to log on to your website. They are the MySQL names that you set up in Step 1.

Hint: if you are working on your own computer, make the changes before you zip up the content management files and go back later to reset them for your local copy.

If you are moving from one remote service to another, you will have to change the settings.php file more laboriously. In Putty or Filezilla, change the permissions to 777. Edit the file. Save. Change the permissions back to 444.  This took me ages. So be prepared to be patient.

Test your site

With these three steps – transfer your CMS, transfer your database, fix your settings.php – your website should run on your new site.

If you have not pointed your domain name to the DNS, you need to do that now.  The order that you do this in is tricky as you can only see your site at the old server or the new one, not both, though you might get a temporary address from your new hosting service.

If you have been careful, the move should have gone uneventfully, so point the domain to the new hosting service and wait four hours to see the result.

One Comment

Struggling with generativity?

Print Friendly, PDF & Email

The brilliance of psychologists

The best skill that you will learn as a student of psychology is to “operationalise” fuzzy ideas.  In plain language, we beceome brilliant at writing questionnaires.  What is an extravert? Someone likes going to parties. And so on.

Warmth is less valued

The skill that you will not learn as a student of psychology is to “encourage” or “enthuse” others.  You might have thought when you started your studies that that is what psychologists do. Sadly, warmth and connection will be beaten out of you as sin of “measurement error”.

And what of generativity?

So you may be really struggling with the idea of “generativity”.  At least know that you are in good company.  We all have to relearn what is means to help others see possibility and goodness, connection and meaning, in their lives.

Generativity step-by-step

To help you understand the meaning of generativity, as it plays out in our lives, here is a letter that seems to have entered the web via Harvard.

And as a good psychologist, note the elements:

  • The impact of chance on our lives
  • The effect of cutting away on defining who we are
  • The constant effort to broaden-and-build, nonetheless
  • The richness of connection to others to whom we are loyal and dreams we hold sufficiently dear to work at night and day
  • The vulnerability to the disloyalty and treachery of others whom we love and causes to which we have devoted the best years of our lives

And then poetically

And then read the whole.  The poetic quality of language is important.  I was never particularly poetic.  Sadly learning to operationalise didn’t particularly help.

Read the original and then take that step of thinking generatively about your lives and the lives of those you touch.

 

Leave a Comment

The 2 reasons I have come to work extensively with Drupal

Print Friendly, PDF & Email

My quest

A few months ago, I was looking for a good way to help my customers keep track of some technical reports – you know those reports with long dry titles with multi-syllabic words.

Surely there was an easy way to present a customer with a few lists – you have seen this already, take a look at this, this is new and might interest you.

My journey

I started off looking at social media software and then I looked at some e-learning software.  And then . . . Drupal.

In all honesty, you don’t want to discover Drupal.  It is a time-sink of note. People politely refer to it as having a “steep learning curve”. Translate: the documentation sucks.

But, here we are with Drupal.

What does Drupal have that is so fascinating?

  • Firstly, Drupal is open source. It has a huge community of people who work on it and contribute modules.
  • Secondly, Drupal is modular.  You are limited only by your imagination (and of course the underlying code which – stomach turning to say – is poorly documented).

But these are both limitations really. They account for the time-sink.

What drew me to Drupal were two features:

  • First, its Search. I can Search through the inside of all my files as easily as using a Google search script.
  • Second, its Outlining.

Let me spell both features out a little more.

Search in Drupal

Think of working on a long project.  I open up a Word document and half-way through, I get called away. I save a draft.  When I come back to the project I look for the draft in Windows Explorer.

Oh, it sounds simple. The reality is different. I always seem to have half-finished drafts that I have half-forgotten about.

Now I try to find what I want. Yes, I can search by Folder and Date and File Type.  Yes, I can search by Title (slowly).  Yes, I could use tags and Google search.  But I’ve abandoned these over the years as not being particularly effective at keeping me organised.

Drupal files everything in one place

Filing and search in Drupal is so much easier.  Everything I write, no matter what it is about, goes into one folder, organised by Date.  Most content has tags similar to a blog post.

Drupal can search inside your files

When I am looking for material, I can still search by the date, the title, and the tags.  But Drupal will search inside my files too.  (Well actually, as long as they are more than three hours old as the cron job is set to run every three hours).

The advantages of Drupal is that I don’t have to move content into folders and when I want to find something, I have a powerful search function.

Outlining in Drupal

But, what if I want to group my files in a folder?

Well, you are not going to!  What you will do will be even better.

When you write a document that belongs in a collection, you simply add it to an Outline.  And, thereafter, whenever you want to add anything to that collection, you simply add it.

The file itself never moves.  All you are doing is adding a hyperlink.

If you want to add sub-folders, you simply add a Book Page and Child Pages to mark sub-folders.  If you want to move a Child Page to another sub-folder, you use  a drag ‘n drop.

Remember though the file itself never moves. So, you don’t have to rely on your memory to find it.  You only add hyperlinks to an Outline.   You also don’t have to type this Outline out. Or, refresh it with F9, or worry whether you added headings in the correct format.

Let’s use a practical example to show the sweetness of the outlining facility

My personal blog has thousands of posts.  To sort those out into the beginnings of a book (or two), I would copy them into Word and have thousands of files. I would have to open each post, decide where to put it, and then move it to a folder.

When I wanted to find that file, I would have to remember where I put it, and the search would begin again.

In Drupal, I leave all those posts in one running file in date order (the defining feature of a blog).  I still have to work through the posts one-by-one because I built  my blog in WordPress not Drupal, but if I have the material in Drupal now, then I can drop a hyper-link of my posts into a relevant “book” – say a book on Drupal, a book on poetry – and so on.

How do I see my whole collection?

When I have sorted everything out, then I can work on any section of any book. I simply go to the “top” of a section and use “Print friendly”. All the files in that section are collated. With CTRL-A and cut ‘n paste, I take the whole lot into Word and condense say five posts into one.

How do I bring a “chapter” back into Drupal?

When I am done condensing a series of posts into one, I simply cut ‘n paste back into Drupal and save the refinement of my work as a blog post or a Book Page.

Easy. Easy. Easy.

Drupal gives us capacity that Office does not.

How do we make Drupal work for us?

Of course, you build a Drupal website. If your work is not public, build a website on your local server.  We have built one for academics on a portable server so it moves around with us on a USB stick. We call it ScholarWriter.

Everything is put into the single Drupal website – a bibliography that is imported from Endnotes, notes, drafts, calendar and doodles.

All easily accessible.

All compatible with Endnote and Word. Portable.

And because the ‘whole bang shooting match’ resides in one folder, easy to back up with a .zip file and dead easy to restore.

Drupal is a time-sink but if the installation has been built already, it is a dream for writers. A dream.

So these are the 2 reasons why you want to look closely at Drupal: its Search and its Outlining. Search looks inside your files without opening them. Outlining allows you to build up an outline made up of hyperlinks. And when you need your material, collates all the relevant files without your having to open them. Pick a small section and you can edit by deleting, tighten up one paragraph. Finally, you simply copy that paragraph back into a page in ScholarWriter.

Drudgery goes down – dramatically.  Focus goes up – dramatically.  You can concentrate on writing not moving files around. And you get better work down faster – much faster.

What else have I written on Drupal?

Leave a Comment

Introducing ScholarWriter

Print Friendly, PDF & Email

Making ScholarWriter portable and researcher-friendly

During the last few months, I have been packaging ScholarWriter into a portable version that comes on a USB stick.  Simply, take one USB stick holding ScholarWriter, start it up, make sure the Apache and MySQL servers are running, – and you can start work on a private website in your browser.

At the end of the day, log out, shut it all down, and backup using a simple .zip file.

If something goes wrong, take your backup and unzip it.  And, you get straight back to work without any angst.

Why ScholarWriter?

So ScholarWriter is portable, but “what is the aim” as Chris Hambly of Audana  and Cornwall said last night on Twitter (@audio).

Anyone who writes long reports – dissertations, theses and papers in academia and long management consulting reports – will be familiar with something not much talked about – research is physically exhausting.

We get relevant material

  • We look for relevant material in the Libraries of the world
  • We get the source material

We read and take notes

  • We track what we have read and what we haven’t read
  • We take notes and carefully put the full reference on the top and paginate our pages

We file and re-file notes (endlessly)

  • We file those notes somewhere
  • When we need our notes, we rely on memory to remember where they are
  • Then if we need them elsewhere we re-file them

We copy our notes again and again

  • Then we start writing and that means cutting and pasting notes from our notes file to our main writing file and carefully putting in the references

Ha!  Try doing that without losing something and having to go through file after file checking details or looking for something you lost.

Now you have the reason for ScholarWriter.  Keeping meticulous track of who said what is incredibly difficult as you move things around physically and your argument evolves as you learn about the subject.  It is not only difficult, it is exhausting. I think that is what we learn in academia and why most people give up and flee to commerce.

ScholarWriter: Software for academics

The key software for academics at the Library end will remain Endnote, or something similar – we want to find references and import them into Word.

And at the other end, the final draft stage, the key software remains Word – we want to layout out our dissertation or paper ready to send electronically to our supervisor or publisher.

ScholarWriter sits between the two ends.

We get relevant material

  • We can import and export our bibliography as single references or a list in .xml format (don’t worry – Endnote and ScholarWriter sort that out for you)
  • We can load .pdfs into the same system so they get backed up nightly with our notes and moved to other computers as one large package
  • We can keep links to online references bundled with the reference in case we need them

We read and take notes

  • We write our notes into something like a “blog post” that has an extra field – type a phrase from the title of the article and ScholarWriter cross-references to the reference (and moreover keeps a list with the reference of where the notes are!)
  • We can open the relevant .pdf file in another window (we can do that anyway but nothing is stopping us doing that)
  • If we come back to our notes and want to make a comment, we just use the normal comments section of a blog post – there is no need to open the file even

We file notes ONCE not endlessly

One large folder in date order

  • We save everything – references, notes, drafts, scribbles, entries into our calendar – in one running file by date order in one folder.

Searching thousands of files is easy

  • You can save everything in Windows too – you don’t need to make folders but this one central folder gets larger.  This is where Drupal, the CMS underlying ScholarWriter comes in.  Drupal has a powerful internal search function.  It searches the content of all your content, it searches by title, it searches by date, and it searches by tag.

Develop and maintain outlines of your dissertation or paper

But that is not all, as the advertisements say, the outlining feature of Drupal is very powerful.  Instead of physically moving files to a folder, you hyperlink them into the outline of a book.

  1. First you set up the cover page.
  2. Then you add child pages for each major section – Title Page, Introduction, Method, etc.
  3. And lastly, after you have saved some notes or a reference or some scribbles that popped into your head, you drop them into the right place in an outline.

You don’t physically move the file from its position in the giant running file – you simply tell an outline which files are relevant to that section.  And you can see the outline developing on the screen in front of you. It is not buried in Windows Explorer in another file.

Using Outlines to speed up your writing

I am always struck that US universities push outlining. This is how you use outlining in ScholarWriter.

When you want to develop a section, yourrepeat the general process.

  1. You break the section up into sub-sections and then you add a child page for each subsection.
  2. Then with a few clicks for each, you attach files to the sub-sections.
  3. The content never moves – but the outline develops.
  4. The outline develops with a few clicks – not opening and editing a file – simply because an outline is simply a “view” it is not a file that is saved anywhere.

Commit your Outline to writing

So if an Outline is never actually saved, how do we “commit it to writing”?

When you want to see everything you have for a section, you ask for “Print Friendly”.  If you have, say five files in that section, those five files will be collated in the order you have them, into one display in another Window in your browser.  Now you can see not only the headings but everything in the files as well.

To print out everything, simple print.  It is that easy.  Five files, say, printed one after another.  A huge saving in physical work.

How can you write up a section?

When you have all the “facts, figures and quotations” collected for a section, it is time to write.  Usually, you would open all five files and possibly physically print the notes on several articles.

Using Scholarwriter

  1. First you preview what you have using Outline and Print Friendly
  2. Then you sort your notes into order – using a drag ‘n drop system
  3. Then you check again with Outline and Print Friendly
  4. If you are ready to write, you use CTRL A and cut ‘n paste to take everything into Word
  5. And now you are ready to turn your notes into a compact paragraph, largely through deletion, and then be writing one tight, cogent, paragraph with references and page numbers.

 Building the text of your dissertation or paper

Now that you have written a powerful and complete paragraph, instead of saving in Word, you copy ‘n paste back into ScholarWriter, or to be more precise, onto the child page ‘holding’ that section.

You no longer need the links to the original notes, so you de-link them.  Each with four clicks, I believe.  You don’t lose your notes though. They sit snugly where they have always sat, in your giant running file, organized by data and fully searchable without any arduous opening and closing of files.

So at this point you have a paragraph written for your growing magnus ops saved as file and positioned correctly in your Outline. And your notes sitting where they always have been but no longer linked to the Outline because you have written that section up.

One paragraph down!  Next!

ScholarWriter fits the advice – little and often

The best feature of ScholarWriter is that it allow you to concentrate on one task at a time.  And to complete small tasks in the time that you  have.

If you only have 30 minutes to an hour in the morning, you can realistically turn the notes on five articles into one paragraph.  A paragraph a day does not sound like a lot, but it is a lot more than no paragraphs a day and a lot quicker than wasting the time you do have on trying to get over procrastination and get down to work when you have been away from your writing for some time.

Imagining the working day with ScholarWriter

Your working day with ScholarWriter amounts to

  1. Adding a reference
  2. Reading an academic article and making notes which you drop into an outline
  3. Structuring your outline getting down eventually to one child page per paragraph (think of an upside down tree)
  4. Writing a paragraph which you save as a file and keep linked to its position in the outline.

Do any one of those and you have made progress. Do four of those and you have made a lot of progress.

Security and ScholarWriter

We made ScholarWrite portable, partly to lower the IT knowledge needed to use it (slap it in and fire it up) but more so for security. When everything you need – your server, your WYSIWYG, your bibliography, your sources, your notes, your outline and your drafts – are in one folder, it’s dead simple to backup. Zip up the folder and send the .zip someone safe by email (start a special gmail account?).

Eveything is safe and can be recovered by unzipping the folder.   Fire up ScholarWriter and you are back in business within minutes.

Stay oriented with ScholarWriter

Even after three decades in this business, I still find the feeling of disorientation when I shift tasks most uncomfortable.

With everything in one place and Drupal’s powerful views, I have lists refreshing themselves to help me get my bearings.

  • When you add a reference, or a bunch of references, to your bibliography, your What I have yet to read list is automatically updated.
  • When you take notes on an article and cross-reference a reference, the reference drops off your What I have yet to read list and joins your What I have read list.
  • When you procrastinate in the morning – focus by looking at the five things you put in your To Do list the previous night using a simple a click of a flag
  • At the End the day, when you are feeling exhausted yet you are asking – What did I do all day? – Click the Ta Da flag as you go and admire your list grow.
  • Take off items from your To Do list and watch with pleasure as it shortens during the day!
  • And ScholarWriter has a full Calendar. Put in dates up to five years’ out (fits a part-time PhD or the publication of a research paper).  Put in recurring dates such as tutorials and include times and details like room numbers

That is ScholarWriter – portable software for academics and other writers of long documents with many primary sources.  Plug ‘n play, easy to back up, and cutting down on the effort of managing your many documents.  You are still the Scholar and the Writer, but hopefully your work is not so exhausting and hopefully you cut a significant amount of time from completing your meticulously prepared document.

 

 

 

Leave a Comment

Use PuTTY to manipulate files on your hosting service

Print Friendly, PDF & Email

In this brief post, I am writing down the three key inputs to setting up a PuTTy connection.

Why do I need PuTTY?

PuTTY allows us to log on to your remote server and move files around the space that we have rented there.

Retrieve files from the internet

For example, once we  have used PuTTY to log in into our rented space on our remote server, we can use the wget command to fetch a file from the internet.

e.g. wget http://ftp.drupal.org/files/projects/drupal-7.15.tar.gz

Manipulate files and directories in our space on the server

We can also use PuTTY to unzip that file.  As the file in the example above is a tar file, the command is a little more complicated than unzip filename

tar –xvzf drupal-7.15.tar.gz

tar -xvf whatever.tar

While we are logged in to our rented server space using PuTTY, we can also make a directory

mkdir newdirectoryname

And rename a directory

mv oldname newname

And remove an empty directory or a file

rm directoryname

rm filename

Move files between Windows and our server space

In theory we can move files between a Windows machine and our server.  This did not work on my server and their support helpfully referred me to the help page I was using and querying.  Maybe these commands work elsewhere.

From Windows to your server

scp username@linuxMachineAddress/linux directory path C:Documents/filename.extension

From our server to windows

pscp ftpusername@server.hosthame.com:/home/ftpusername/helloWorld.txt C:Document/shelloWorld.txt

Install PuTTy

PuTTY is a tool rather than a Program.  That is, it doesn’t install in the Programs on Windows.  Download it to wherever you store your tools.  I have a directory c:/tools (the lowercase t reminds me this is a user directory and not a default folde that came with the computer and the standard install of Windows).

Download PuTTY.exe here.

Set up PuTTY

To use PuTTY on a Windows machine, you simply double click on the icon in c:/tools and select Run. A menu opens and you have a baffling array of choices.

Fortunately, you are able to store your choices.  The most convenient thing to do is to store the setup of PuTTY for each connection you are likely to make. That way, when you come back, you only have to pick your settings from a list.

For example, if you website is on server99 at dreamhost.com, you want to set up PuTTy to connect to server99.dreamhost.com.  Let’s also imagine that you have two users on server99. You have one set of settings for user1 at server99 and another set of settings for server 2.  You save both sets of settings separately as user1settings and user2settings.  In future, you simply pick the correct settings, PuTTY will connect to the server for you and you are then asked for your Password.

The key settings are

  • Session:  Enter your host name (e.g. server99.dreamhost.com) and select SSH
  • Data: Input your ftpusername in Auto login username
  • SSH: Select “2 only”
  • Session: Enter a descriptive name into Saved Sessions and Save

Notes: On Dreamhost, you have an account (that you pay for). Withing that account, you will have space on one of their servers; hence a server name.  On that server, you can create any number of users with names you provide.  Within that user, you can host more than one website though Dreamhost prefers to set up a separate user for each website so that the damage is limited if that user gets hacked.

Run PuTTY

When you need to connect to your server:

  1. Go to c:/tools (or wherever you stored PuTTY)
  2. Doubleclick and Run
  3. Select your settings and open
  4. When you are asked for your password, type in your FTP Password (that you set up on your server when you set up your account or set up a new user)
  5. PuTTY gives no indication that you are typing. Do not worry. Type the password accurately and press Enter.
  6. There is a short delay and then you are in to your server.
  7. To exit PuTTY, type exit<enter>.

Moving around your space

Important commands for moving around your space and staying oriented are

List files: ls

Change directory downwards: cd directoryname

Go to root: cd

Go up a directory cd  ..

Now you are equipped to log on to your server in a few clicks and a password, to upload and download files, to unzip files, to rename directories, to delete directories.

Notes:  A question to myself.  Do you not need shell access to use PuTTY. When you are logged in to Dreamhost, you can request shell access for any user (remember you set up users within your account and you will have to request this for each one.).

One Comment

%d bloggers like this: