There may hold upwards times when yous involve to export information from a unmarried tabular array too import into a unmarried tabular array inwards an existing database using phpMyAdmin. In this post, nosotros shall speak over how to export information from a unmarried tabular array too import into unmarried tabular array using phpMyAdmin?
Here is a scenario when such an activeness may hold upwards needed for improve understanding. This is from my practical experience.
So, at that topographic point is this WordPress website nosotros had, too the subject had to hold upwards customized. Since nosotros did non desire to disrupt the alive site, nosotros took a backup too installed the re-create on a evolution organization to farther customize the site. During the customization process, nosotros ran into unopen to issues. And to isolate the problem, nosotros disabled unopen to plugins to cheque if the plugins were interfering amongst the problem.
The occupation was, nosotros were using a WordPress plugin called “Post Views Counter” to display views on each post. During this procedure of troubleshooting every bit described above, nosotros had also disabled the “Post Views Counter” plugin (or may fifty-fifty induce got deleted it from the plugins page inwards WordPress) . Later when nosotros re-installed /re-enabled the plugin, nosotros flora the stats induce got been reset. The post service views were all zeros. And nosotros wanted to retain the values.
After the required customization was done, nosotros needed to convey the stats of “Post Views Counter” from the alive site to the evolution site, earlier nosotros upload on the alive server. Note: at that topographic point could induce got been unopen to other agency to create this, but nosotros did non desire to induce got a risk. More on this described at the destination of this post.
So hither is what nosotros did: to export information from a unmarried tabular array too import into unmarried tabular array using phpMyAdmin.
How to export information from a unmarried tabular array using phpMyAdmin?
To backup solely a detail tabular array inwards phpMyAdmin, click on the detail tabular array too click Export. This volition export solely the tabular array too non the entire database.
Activities on the alive server:
- Logged inwards to phpMyAdmin
- Backed upwards the entire database (just inwards instance needed)
- Clicked on the detail tabular array from the left sidebar (ngk_post_views inwards this case)
- Clicked Export
- This exported solely the tabular array (ngk_post_views inwards this case) inwards .sql file
Now that nosotros induce got the backup of the detail tabular array (ngk_post_views inwards this case), nosotros needed to restore this on the evolution server.
How to import information from a unmarried tabular array using phpMyAdmin?
To import information from a unmarried tabular array using phpMyAdmin, the procedure is the same every bit importing database. BUT, the tabular array yous are importing should non exist. Otherwise, phpMyAdmin volition throw an error.
Activities on the evolution server:
- Logged inwards to phpMyAdmin
- Backed upwards the entire database (very important)
- Click on the database
- Then select the tabular array nosotros intent to import, too click drib (table)
- Then select the database again, merely inwards instance it is non selected
- Click on import too select the backup file of the tabular array downloaded from the alive server
- If every affair goes well, the import should success (unless at that topographic point are other issues, which nosotros did non encounter)
- We clicked on the tabular array too checked the values too the counts were restored.
- Viewed the posts on the site’s forepart end, too nosotros could watch the counters restored.
Now that the post service thought counts induce got been restored, nosotros migrated the site to the alive server.
By the way, to upload your WordPress website to alive server, yous tin purpose plugins similar “Duplicator”. Here is a previous post service on –How to purpose “Duplicator – WordPress Migration Plugin” to migrate evolution site to alive site?
As mentioned above, this could induce got been achieved inwards unopen to other way.
We could induce got “dropped” the post service views tabular array from phpMyAdmin of the evolution organization too therefore exported the database. When this is imported on the alive server, the post service views tabular array on the alive server database is expected to hold upwards every bit it is. Ensure backups are taken earlier attempting whatever of the examples inwards this post, too at your ain risk.