You don't want to exactly memorize the openings, you just want to keep in mind the concepts of each opening. This will allow you to be flexible when someone does not play the written lines of an opening.
Memorising Openings

No, I do want to memorise some openings. Move for move and variation for variation. How do I do it and retain it in my long term memory?
PLEASE NOTE: do not respond to this post telling me to understand the themes of the openings - I can do that no problem. I want to know if anyone has a successful technique for memorising lines of moves.

Play the same position over and over again OTB or on Fritz. That way you get so used to seeing the same positions and lines that they become ingrained in your memory.

This is a trick I do for memorizing songs. Let the move order be the very last thing you do before bed. As gundamv said, do the moves over and over...right before you go to bed. As you sleep, your brain will reflect on the last thing you did, and you stand a better chance of retaining the idea.

"Chess Openings Trainer" iPad app is good:
https://itunes.apple.com/gb/app/chess-opening-trainer-position/id505079674?mt=8
And there is a similar desktop product that also has a SRS function builit in (something the above-linked iPad app doesn't have):

I suggest memorizing MCO opening tables. It's easier to memorize text than seeing the actual moves played on the screen or board.

I suggest memorizing MCO opening tables. It's easier to memorize text than seeing the actual moves played on the screen or board.
Well, that depends on the individual and their primary modalities. Some people do better with visual, some audio, etc. As a rule of thumb though, a combination is going to be best. The above software gives visual moves, and text moves. A shame it doesn't also read the moves out loud, actually.

That does look like a useful app. Will check out the vids.
Does it have something like the spaced repetition system often used in language learning?
@birdbrain: that's true, but then I don't sleep so well because my brain doesn't turn off!

Yes, that kind of thing, JJ (the desktop app, not the iPad app - though this latter does at least increase frequency of presenting lines one gets wrong).

Oh, and somehow I missed that you mentioned memory palaces for some things, but found it difficult with chess. I've used memory palaces for chess lines too.
I first made a peg (if you're familiar with memory palaces, I'm sure you're familiar with pegs) for each piece and each square, and made these things interact with each other as appropriate. I arranged a lot of lines into several buildings, one for each relevant part of the ECO, and then parked an extra peg for the WLD rate of the lines (I already had a 00-99 peg system, so I just used that, thrice, in a three-tiered cupboard), and then a creative image in each room (important lines get a room to themselves) denoting the name, not that this is pressingly important of course.
However, I found that after putting all the main lines in there, I soon got sufficiently familiar with them that I prefer the above software for fine-tuning them, and also for the greater rapidity with which recall comes.
I did find my ECO memory palace a good step along the way, and although I haven't used it in a couple of years, writing about it now, I see it is still in a good state of repair and I can still retrieve plenty of information from it, so clearly the method I used was sturdy. If I wanted to make it battle-ready, I'd need to spend at least a day or so doing repairs, I think, refreshing and reinforcing the stuff I put in there.

Thanks, David - I was thinking of trying something along those lines but didn't want to put in the front-loaded effort if it didn't work.
Initially I thought of 64 palaces or rooms within palaces for the squares, but didn't see how it would work. So you make the pieces and squares interact within your rooms? Do you assign each piece an individual peg or do you have 1 for white rooks, 1 for white pawns etc.? What about the move from square - does this interact as well as the destination square?

It was a full evening's work to figure everything out and essentially build the place, and then a few days inputting the few hundred lines I wanted.
If I had not bothered with the memory palace and just used software, I could have spent the first evening inputting the lines, and then a few days training with the software. The end result would have been comparable in terms of both time spent and utility, I think, at least in the short term.
In the long term, I think it's clear that memory palaces result in remarkably durable memories, more so than the kind created by training with most (if not any) software.
Initially I thought of 64 palaces or rooms within palaces for the squares, but didn't see how it would work.
Yep. I did this, and then placed them in the rooms of my larger palace. So, memory palaces within a memory palace.
I made 64 small rooms, with dark or light ambience depending on the colour of the square, and then with decor pertaining to the peg for the room. For example,
g4 = gore ( because in my 00-99 peg system, 4 is represented by r, for example 44 = roar, 47 = rot, 14 = liar (vowels are null, to enable me to make words quite freely), so g4 is a small cubic room with a door in each of the four walls, light and airy in appearence, but with gore all over the place, and Al Gore chained to the wall, wearing a Gore-tex jacket and covered in gore like everything else there.
So you make the pieces and squares interact within your rooms? Do you assign each piece an individual peg or do you have 1 for white rooks, 1 for white pawns etc.? What about the move from square - does this interact as well as the destination square?
Each piece an individual peg. White a-pawn is Astérix, White b-pawn is Bilbo, and so on. (Pawns keep their original identities in this system even if they later change files - this may seem confusing, but I found it to be a lot simpler than changing them)
To move from one square to another, the piece leaves the room it's in, visually disengaging itself from whatever is there, and enters the room representing the square to which it is going (doors aren't strictly necessary here, nor is going through the rooms that may lie in between; the piece can just slide through the corner or climb over the wall between rooms or whatever works for you - another hobby of mine is lucid dreaming, and because of it, I'm quite comfortable with warping reality a bit, and that carries over to my use memory palaces), interacting with what it finds there. If the move is a capture, it will vividly kill the other piece, and the body will then combust (you may be aware that to clear an item out of a memory palace, it's necessary to do that memorably, or the image will stick around).
If this sounds slow, it is at first, but can soon be sped up to very respectable speeds, as images whiz around at lightning pace, having been reinforced. If you think of your usual trip to work now, however long that may be, you can probably complete the journey in your mind in a matter of seconds despite doing it visually - that kind of feel, almost like zooming through a 3D space).
Now, let's regress a bit to my larger memory palace, and how I actually then access all of the above.
I have five buildings, for openings categorised A, B, C, D, and E according to their place in the ECO.
Within these buildings are rooms, and each room contains varying numbers of loci. The rooms themselves have no special significance to the contents, since I based the larger palace on a real series of buildings that I know well. However, the loci are arranged numerically, so I'll meet B00, B01, B02, etc, in that order. Each locus contains an image that'll take me to a small specially added room via a ladder disappearing into a hole in the ground, and in that small room will contain loci for the various lines categorised under that ECO heading, that I've memorised. When I go to the locus I want, which will be marked with the name of the line (I give them names where they don't have specific names already), encoded visually of course, and this takes me (I'll have the image itself act anthropomorphically as a tour guide) to the correct chessboard for that line. For the first few goes I'll have it take me 'round, after that I'll ditch the guide as I naturally whiz through the game according to the "this-follows-this-follows-this" method of remembering lists, made ten times easier by being in a very engaging memory palace instead of being faceless letters and numbers.
Note to those who are unfamiliar with memory things like this:
Yes, I know this seems insane. However, it works, and it works well, after the initial investment of time in figuring out and setting up a given memory palace and/or peg system. If you don't like the idea, don't do it. I'm just answering JJ's questions, and doing it at length since it's a topic that interests me and I enjoy waffling about it.

Great stuff, David - thanks for taking so much time and effort in your reply.
This memory stuff can be incredibly addictive. I'm at the beginning of my journey with it, having started about 6 months ago, but noticed the incredible benefits of essentially programming my brain with the stuff I wanted. For someone with what would be considered a bad memory (except for music, which was an odd and quite significant exception), I thought that it wouldn't work for me, but it did. In fact, it dawned on me that the more creative you are, the higher your chances of success.
A friend is a local memory champion, so he pointed me in the right direction, but I never figured out a good, robust way of making it work for chess - probably because there is quite a lot of crossing of paths involved, creating a lot of potential pitfalls.
I use a similar, phonetic system for numbers, although I didn't use the Dominic method of 00-99 which is probably, in the long term, more robust. I make up sentences with my phonetics that I can then place in a palace.
eg Pi to 50 dec pl = 3. Larry, leave Pingu to foam. If the big booming mother don't ram much money keep fuzz in a jar. A leap killed Bambi by my cough oils.
etc. to 100 dec pl.
1 sentence per room, regardless of the number of digits. By the end of the 50th digit, Bambi is lying dead at the bottom of my stairs in a puddle of Benylin.
The problem with this is that it needs a lot of practise to keep the decoding up to speed because some digits can be represented by several sounds to make encoding easier.
I use Metivier's 26 x palace method for learning French vocab but, again, am at the opening stages of the game there.
Anyway, I like some of your ideas and may use a few in my efforts. As you know, it is important to personalise these things to make them work. It is encouraging to know that they have worked for you.
Two questions: 1) Do you find that it is working well in your OTB games? 2) How do you deal with paths crossing in your palaces and transpositions?
I've started building some flash card sets for my pet openings, using SRS software on my iPad to complement the potential memory palace work. The act of putting images on the flash cards also assists with memorising, but takes a long time. It does look slick though.

is interesting and entertaining; thanks for sharing.
Two questions: 1) Do you find that it is working well in your OTB games? 2) How do you deal with paths crossing in your palaces and transpositions?
1) At my (very modest, especially after a truly appalling first OTB season from which I'm only this season recovering) level, it's overkill. OTB, I get an advantage out of every opening, every time, and am always in my personal book for longer than my opponent is in theirs. How long I maintain the advantage gained from the opening is another matter entirely :p For this year, I'm sworn off opening studies, and am resolved to concentrate on tactical workouts and endgame knowledge.
2) Regards paths crossing, I rely on the "tour guide" peg to keep me from flitting to the wrong board-palace. Regards transpositions, I just rely on recognising them and re-entering from a different route if necessary. I think it'd be pushing a bit to start trying to code hashtables into my memory palace (although I daresay it could be done - it'd just take a crazy length of time, to the point that I've not embarked on it, and as it stands, don't plan to, though I confess I have contemplated the viability of making a mini-tablebase system for some endgames - that's as far as I've got with that though, just a pipedream for now).
Does anyone have any tips on getting opening moves into the long term memory? I use memory palaces for other things, but can't seem to make it work for chess positions.
Any good software / flash cards suggestions?
All ideas welcome.