This has been asked and answered many times in the past on the list.
In short, you have to:
- query WU for the time periods you want
- reformat the data you'll get into a form compatible for restoring into weewx's archive
- import into the archive
- drop-daily and restart weewx to rebuild the daily stats, noaa tables, etc (this part will take a while)
Downloading:
==========
I wrote a utility years ago to do the querying part, which relies on a perl CPAN module that you'd have to install - https://raw.githubusercontent.com/vinceskahan/weewx-odds-and-ends/master/getWunderHistory.pl is there you'd find it. Disclaimer: I haven't used this in years, so I'm not certain about whether it still works. WU might have changed their interfaces since then.
The best one I've found was from a thread "reverse wunderfixer" in this group which points you to a pretty cool utility at
http://oco-carbon.com/weather/access.html - I tried this back then, it worked. Do your downloads in small batches (a couple months at a time) or it makes you a little uneasy waiting for it to complete sometimes.
Reformatting
==========
Assuming you use sqlite3 as your db, the easiest way is to generate a sqlite3 dump/restore text file then restore the records on top of (a copy of) your archive database, which will add them to the archive table. Getting the right fields in the right order requires a little manipulation, I'm not aware of a end-to-end automated utility that handles this for you. There have been examples posted to the list of how to do this in the past.
Bottom line, you have some manual work, but once you get the data from WU it's doable. Hardest part is reorganizing your data to get the right fields into the right order left-to-right. This is one place where Excel actually isn't bad, you can drag'n'drop the columns to the correct order pretty easily in that. Just be sure to have empty columns for the (many) fields that weewx supports that WU doesn't. You wouldn't want your outTemp data written into a windspeed field in weewx :-)