Sakho, 23, who has 14 France caps, will cost around £18m from Paris St-Germain.
Sporting Lisbon's Ilori, 20, has represented Portugal at youth level but is still eligible to play for England because he is born in London.
Sakho told the club's website: "I came here because the project at Liverpool interests me. I'm really looking forward to playing my first game."
He is manager Brendan Rodgers's most expensive signing of the summer and can play in the centre of defence as well as at left-back.
Liverpool managing director Ian Ayre said: "He's an important marquee signing for us. It was a difficult one to do and it was a difficult one for us to get, but I'm very pleased that we've been able to attract him to the club."
Ilori, who cost £7m, said: "Liverpool have a great team and I think it's the place for me to be at the moment.
"There have been some great teams here in the past, the club has won a lot of trophies and I want to be a part of it."
Rodgers has now signed seven players this summer following the captures of defender Kolo Toure, striker Iago Aspas, winger Luis Alberto, goalkeeper Simon Mignolet and left-back Aly Cissokho.
Liverpool prioritised defensive recruitments because Sebastian Coates has been ruled out for most of the season while Toure and Cissokho are also injured.
Sakho and Ilori were both at Anfield on Sunday to watch Liverpool beat Manchester United to move top of the Premier League.
Meanwhile, forward Daniel Pacheco has left Liverpool to join Spanish second tier side AD Alcorcon.
The 22-year-old had struggled to break into the Reds first-team and failed to score in his 17 senior appearances during his six years with the Merseysiders.
He was sent out on loan to Rayo Vallecano, Norwich City and Huesca but has now moved to Alcorcon on a permanent basis.
I will always be a red," tweeted Pacheco. "It's been my house and I will never forget it. Thanks to all you fans for the support and hope we celebrate the Premier League [title] this season."

Maylis de Kerangal is the first French author to win the Â£30,000 award, which honours books of any genre that has a central theme of health or medicine.
It is the first translated text to win and only the second novel to win in the award's history.
Head judge Val McDermid called it "compelling, original and ambitious".
Described as "a heart-breaking and gripping story of life-saving medical science" it follows the story of Simon Limbeau's heart.
He heads out on a surfing trip with two friends but they crash their van on the way home and he is left brain dead but with a beating heart.
His family then face the tough decision whether to donate his heart.
The book depicts the "24-hour whirlwind of trauma and death, life and hope" and ends when the heart starts to beat in the body of someone else.
This year's Chair of Judges, Val McDermid, announced the winner at a ceremony at the Wellcome Collection in London on Monday.
"Mend the Living is a metaphorical and lyrical exploration of the journey of one heart and two bodies," she said.
"Over 24 hours we travel from trauma to hope, discovering both the humane aspect of organ donation and the internal dramas of those affected by it.
"Compelling, original and ambitious, this novel illuminates what it is to be human."
Mend the Living is de Kerangal's fifth novel. She has won previous awards in France for her novel Birth of a Bridge and her novella Tangente vers l'est.
It was translated by Jessica Moore, an award-winning translator, songwriter and poet based in Montreal.
The book has already been adapted into a film by French film director Katell Quillevere, which will open in UK cinemas from 28 April.
Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.
Liverpool have signed central defenders Mamadou Sakho and Tiago Ilori for a combined fee of about £25m.
[NEXT_CONCEPT]
Mend the Living, a "heart-breaking" novel about 24 hours in the life of a heart that is transplanted, has won the Wellcome Book Prize.