Sounds like your second site is pointing to the database tables of the first site.
You need to create a new database, database user (with all privileges) and then attach it to the new WordPress site using the WP-Config file. I hope this helps!
This is simple step-by step guidance
If you use Cpanel as web hosting management tool
- Export Local Database
Login to your original web site local phpMyAdmin, select the database from the dropdown. Click on the Export tab:
Under the Export field, make sure all tables are selected
Under the Structure field, tick “Add DROP TABLE / DROP VIEW”
Tick “Save as File”
Then click Go and it will prompt you to download a SQL file
- Find and Replace All original URLs with new ones
Open the database SQL file with a text editor. Find and replace all local URLs with your domain URL (eg. replace all “http://localhost:8888/mysite” with “http://www.yourdomain.com”).
- Import The Database to new web site.
Login to your new server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go.
- Upload the entire WordPress folder to your server. Connect by FTP and copy all content from public_html form original server to new, It is better create archive file through Cpanel/File manager, than download it, upload it on new and extract, take just a few minutes instead of copying hundreds small files to and from
- Change The wp-config.php Setting
On your new server, open the wp-config.php file. Change the database details to reflect your server settings.
/ ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '<strong>accountname_wrdp1</strong>');
/** MySQL database username */
define('DB_USER', '<strong>accountname_wrdp1</strong>');
/** MySQL database password */
define('DB_PASSWORD', '<strong>password</strong>');
/** MySQL hostname */
define('DB_HOST', 'localhost');
Almost done. Good luck.