Not the easiest place to hitch, and hitching into a car will only make your journey around £5 cheaper. You could ask around the port and explain that it's cheaper to travel into a car than by foot and they might help you out! Not many people stop before getting on the ferry so the car park is not very busy. If you're hitching to the port, it's probably better to get dropped off on the road coming into holyhead, (it's not a motorway so you can stand by the side with your thumb and a big sign), and try to catch all the cars heading to the port there.
If you travel with a dog, then you can only take a small dog as a foot passenger. This means you've got a very understandable reason to want to go on with a car!
July 2014: Antoine and Avery successfully hitchhiked a yacht from Holyhead to Dublin, having waited less than 15 minutes by asking sailors at the marina.
The port is indeed not practical to hitchhike: you'll be received with hostility from the port's authorities. Instead, go straight to the marina. You can either directly ask sailors, or go to the marina's office and ask them if any boat is going to Ireland.
From the ferry from Ireland
Most likely you are a foot passenger crossing from Dublin to Holyhead. When you are in the ferry You can ask people for a ride. But you have plenty of time to prepare a neat sign! Don't hesitate to write London, if you want to go there, although it is far. But the best thing is, people will watch you writing the sign, and for sure they will ask if they can help.
If not, get out of the ferry as soon as possible! Yes, run! Get out of the ferryport, towards the exit, there will be a roundabout. You can try to get a lift here, but a better spot is, when you keep on running for 50 metres more. There will be a nice spot, where all the cars passing by can see you easily. There is also a parking 15 metres ahead - perfect.
The reason why you should run and hurry is simple explained: Cars from the ferry are more likely to go far to major cities. If all cars are out from the ferry, you may have to walk to the motorway (which is close) and hope for better luck. So hurry up, every car counts!