What format are you using to move it across, ie CSV, etc?
Do you have the rights to the relevant source database (the one your trying to copy across) to access it via PHP?
If you have the rights and access to the both the source and the new database then in the new database you could copy the structure alone across then for each table have php run a “SELECT_INSERT” query for each table in turn. Depending on how huge the source database is, you may need to increase the amount of time php allows for script processing.