although I will lose time it will be better to just start all over again?
I have discarded bad software without a second thought.
I rarely think I will "lose time" by discarding rubbish software.
It's rubbish. Discard it. It doesn't matter how precious it may have seemed because some effort has been invested in it. If it's rubbish, then all further effort is simply creating more cost not creating new value.
What should you consider before making this step?
The revised design.
How to preserve the data.
I know it can be drastic in some cases,
False. Rubbish is rubbish. Discard it early and often. It's not drastic when the software is rubbish.
is it best to just totally ignore what you did before, or take some of the best bits from it?
That's imponderable. It depends on specifics of what you did before and how bad it was.
Our current web site uses a trailing
application_# naming scheme. The number is the major version number. When we make a database change, we -- essentially -- discard the entire previous version of the application. It's tied to the database pretty tightly.
We don't "incrementally" change the database. We discard the previous version and move forward.
Two of the modules is on major version 3. Two previous discards of rubbish software.
One of the modules is on major version 2. The previous had to be discarded as unworkably bad.
These are discards of the previous version and migration of the data to new tables with a different structure (hence the major version number).
We do it all the time. The quicker you get rid of rubbish software the more effective you become.