Whoopi Goldberg has said she feels “lucky to be alive” after becoming seriously ill with pneumonia.

The View star, 63, suffered from pneumonia in both lungs as well as sepsis earlier this year.

She spent almost a month in hospital and was told there was a 30% chance of her dying.

“I’m lucky to be alive. I’m happy to be alive,” Goldberg told People magazine.

“I’m grateful to be alive.”

View this post on Instagram

@dubgeebywhoopi TODAY

A post shared by WhoopiGoldberg (@whoopigoldberg) on

The actress said she has “cut down a lot of the stuff that I would normally be doing” so that she can rest and recover.

She said: “In the morning I go and do the show, then afterward I have my other work, and by 3 o’clock, I have to sit down. I have to stop.

“It’s taking a little while, but I’m getting there.”

Goldberg said that before falling ill she did not think of pneumonia as being so serious and wants her story to be “a cautionary tale”.

“You have to take the time to take care of yourself,” said the Ghost star.