My iPhone was set to delete texts after 1 year but I've realised I needed some that were longer than that. How can I retrieve them. I've looked on iCloud and there isn't a message icon to click on
Welcome to iMore! Unless you had an old year old back up in iCloud, they're gone. They deleted. You need to set it on "forever" for the future if you want to keep them.
You can try the utility app Dr.Fone by Wondershare. It should allow you to recover messages and photos. It works with both the device itself or iTunes backups of it. I found it very useful a couple of months ago, give it a try (they have a free trial I beleieve)