Skip to content →

Category: SOCIAL MEDIA & IT

How to migrate your Drupal site in 3 steps

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

The 2 reasons I have come to work extensively with Drupal

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

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

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

How to make a picture (.png with a transparent background using Microsoft Office

I wanted to make a little text logo with a transparent background for a logo.  This is how I did it using only Powerpoint and Microsoft Office Picture Manager.

1 Use Powerpoint to make the logo in WordArt

  1. Open Powerpoint and a new presentation
  2. Insert WordArt and add your text
  3. Right click to allow you edit the Text Effects and Shape. Patiently remove anything you don’t want and set every background to transparent.
  4. If you cannot see Save as a Picture, right click on the text box and tell it to close the edit.  If necessary, do this several times until Save as a Picture appears.
  5. Save as a Picture.

2 Use Microsoft Picture Manager to crop and resize

  1. Use Microsoft Picture Manager to open the .png file.
  2. Crop and resize as you need to.
  3. Resave.

Done!  You should have a text logo in .png format with a transparent background.

3 Comments

Install a WYSIWIG editor on Drupal in 6 clear steps

I hope these instructions will save other people that many hours I spent.

Situation

I am setting up a blog with Drupal and I want to add a WYSIWYG.  If you blog already, you will recall that WordPress, and very likely other blog progams, allow you to write directly onto the screen.  This is called “Visual”.  Alternatively, you can write in plain text and add HTML (e.g., mark a heading with  <h1>).  This is called HTML.

The core of Drupal comes with HTML only.  I am trying to add a WYSIWYG or Visual option.

Overview

Basically, we have to

  • Download and install the WYSIWYG module.
  • Go to Configuration and look for WYSIWYG profile.  Select it.
  • Look at at the choice of WYSIWYG editors.  I chose CKeditor.
  • Make a new folder in the root directory of your website.  More  just now.
  • Download and unpack the CKeditor following the link provided.
  • And now for the trick.  Rejig the position of the files of CKeditor.

Taking these steps one-by-one.

#1 Download and install the WYSIWYG module

You have two choices.  Install the WYSIWYG module manually (go to Modules in the top tool bar) and then remember to install the module which requires only that you check a check box.

Alternatively, if you have already installed Drush, go to your Windows Command Line (at Start, All Programs, Accessories), check Drush is working by typing “Drush Status”, and then change your directory to your website.  “cd c:wampwwwmywebsitenamesitesallmodulescontrib”.

Use Drush by typing

drush dl wysiwyg

drush en –y wysiwig

Note the module name is typed in lowercase.   The commands just mean “use drush to download wysiwyg” and “use drush to ‘enstall’ wysiwg”.

#2 Find the WYSIWYG Profile

Don’t use the profile on the Modules page.  Select Configuration on the top tool bar and look for the WYSIWYG profile on the left.  It should be immediately under “Text formats”.  If you cannot see it, go to your modules folder, delete WYSIWYG and start again. At least, that was my solution.

#3 Choose a WYSIWYG editor.

If you see the WYSIWYG profile, select it and you should see a long list of WYSIWYG editors all highlighted in blue.

I chose the first one, CKeditor.

Now, don’t rush.  This is not a module.  It is a library.  So, the download instructions are different.

#4 Make a folder to store the library

Using Windows Explorer, make a folder to receive the library.

I am working in WAMP and I will make a library folder at “sites/all.”  So I create C:/wamp/www/sites/all/libraries.

#5 Download the WYSIWYG editor library

Now go back to the screen where you had the choice of editor (highlighted in blue), download the library, and unpack it into your library folder.

#6 Rejig the files in the library

And now the catch which I will try to explain well as it caught me out for a while.

You will know have two folders, both containing files.

C:/wamp/www/sites/all/libraries/ckeditor

AND

C:/wamp/www/sites/all/libraries/ckeditor/ckeditor

Copy all the files from the lower folder (ckeditor/ckeditor) into the upper folder.

Summary

Now when you go back to the top tool bar and select configuration, and go to the WYSWYG profile, you will see a boring white and grey table containing the label “Input Format”.  Congratulations!  You have done what defeats many – activated the CKeditor on Drupal.

Use the drop-down lists to pick the CKeditor and save.  Nothing happens, so go back to the WYSIWYG profile and you will see a new screen where you can “edit” the settings.  This is where you set up your WYSIWYG editor.  Reward yourself. Here comes another learning curve!

Have I written on a similar topic?

2 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

Rebuild eStore on WordPress in half-an-hour

In my current mood, I do not recommend the eStore plugin but if you must, pay your money and do this. I had to rebuild my store. Now I know how, it should take half-an-hour. It took my over 9 hours with back and forth to the vendors. Here’s some tips to help you understand what is involved.

So calm down, read carefully, and work carefully. 30 minutes should be ample especially with some preparation long before you get into trouble. So I will write as if you are building the eStore from the very beginning.

#1 License and commercial details

• Keep two pieces of paper – the email with the download link and the Paypal transaction.

• Keep the email address you used and the Paypal transaction number – they work as your permanent license. You need them to communicate with eStore.

• I have stored them in various places like my email, on the CD where a backup of the plugin is stored, in my diary in case I am away from my desk when it crashes – which it will it seems.

#2 Help and forum

Now sign up to the forum and change your password. Again you don’t want to do this when your shop is collapsing and you are under pressure.

#3 Supercache – not

Then download the plugin and use it. Don’t use Supercache even if your hosting service says to. And even though eStore says things like “if you are using Supercache”. They mean “please never use Supercache”.

If you are in Europe, don’t use Supercache. It stops people changing their details in your cart and shows the details to other customers. Without stopping to worry too much about it, it seems that this breaches Privacy laws horribly.

And don’t delete Supercache if you find you have it running with eStore because it eStore will break you WordPress dashboard.

You must deactivate, if not delete eStore, take down Supercache, and rebuild eStore. Horrible, huh?

#4 Rebuild eStore

Rebuilding eStore is much easier than eStore makes out. This is what you need to know.

Your WordPress site has two parts: the code is loaded up in one part which you can see using FTP. The content of your posts is loaded into a MySQL database which is accessed through phpmyAdmin.

When you back up your WordPress site, only the MySQL database is getting backed up. If you want to restore your database, you still need a skeleton WordPress site to house it. You can always rebuild a Worpress site from scratch and put back in them, and modications and plugins. So remember to back up any themes that you have bought, any child theme you have written, and to list the plugins you use and any licenses that you have like for your spam catcher. This is not stuff to leave till tomorrow. Always do it immediately.

So let’s assume you do have your MySQL backed up, and you do have the modifications to your WordPress theme backed up and notes of what is where on your website.

To rebuild eStore, you also need a good copy of their code. If you bought it recently, you have one. If it is a few months old, get the commercial details together and to their forum to hunt, and I mean hunt, for a link for automatic updates. Use the commercial details to get updated copies of the plugin.

Save the up-to-date plugins somewhere on your C drive (remembering to backup them up on CD later). Now what you are going to do is wipe out the offending plugins and write back the code for the plugins.

Use FTP or Filezilla to look at the WordPress PHP for your website and track to wp-content/plugins. Delege the wp-cart-for-digital-products and any offending caches. You can do that because only the code hangs in those foldders. The details of your shop have been stored in your MySQL database (which is backed up anyway, right?).

Now you can transfer the new plugin from your hard drive to the folder where the old eStore hung out. And all should be good.

The key is to be clear where everything lives and that the details of your shop are in MySQL and the code for the plugin is in what you see in FTP (your theme is also there). The only shop assets you can see in FTP are under wp-content/uploads. If you are selling digital goods, that’s where they are. All the tetchy little details of the shop and who bought what are in the MySQL database with your posts, comments, users etc.

I hope this helps. Rebuilding eStore should take about half-an-hour. It took me 9 hours. It needn’t.

CHECK OUT SIMILAR POSTS

Leave a Comment

%d bloggers like this: