Improved my srcipt for sql import from live & convert to new theme.