Import/export database from old CRM version(5.4.0) to New CRM version(5.15.2) in wordrpess
Ashok welcome to CiviCRM stackexchange

If you new CiviCRM database has not gone live than i would 


Create a test instance of CRM 5.4.0
Upgrade CiviCRM to 5.15.2
Dump the Civi database after upgrade.
Drop the Civi database or all civi table from CiviCRM database i.e linked to your new Wordpress.
Import the CiviCRM database that was dumped at #3
Open CiviCRM from UI.
Clear CiviCRM cache by navigating to Administer >> System Settings >> Cleanup Caches and Update Paths.
Rebuild trigger by running http://domain.orn/wp-admin/admin.php?page=CiviCRM&amp;q=civicrm/menu/rebuild&amp;reset=1&amp;triggerRebuild=1


If you don't like above approach then you can use extension that migrates settings from one site to another


Config Items - This tool supports adding and updating using json method
ContactTypes, MembershipTypes, RelationshipTypes, OptionGroups with OptionValues, Groups, Tags, FinancialAccounts, FinancialTypes, EventTypes, ActivityTypes, LocationTypes, CaseTypes, CustomGroups with CustomFields, CiviCRM Settings (system settings set through the Setting.API - be especially careful with that!)
MI Data quality Tools - This tool supports adding and updating using json method
ContactTypes, MembershipTypes, RelationshipTypes, OptionGroups with OptionValues, Groups, Tags, EventTypes, ActivityTypes, CustomGroups with CustomFields, Profiles
Config Export (Undeveloped) and exports into yml format. (Import is not handled)
Import/Export(CRM_Utils_Migrate) This script performs data migration like Contacts, Contributions etc but not settings. But you can use export script to export in json format and then import using using extension from #1 or #2.
You can also use CiviCRM UI import/functionality to import Contact and their related data.


Cheers

Pradeep