Merging two WordPress Post/Comments tables in MySQL phpMyAdmin - mysql

I know the "merge tables" question has already been asked in a variety of ways, but I can't seem to find an answer to my specific question.
Here's my deal: I've been designing a WordPress site for an organization for four weeks. When I began designing I took an export of the database and imported into my local development site. In the meantime, this organization has naturally continued to post things and receive/approve comments on their live site. On the local side, I have also created posts, edited pages, changed widgets, etc during development. So now that we're ready to launch the new site, I need to figure out how to merge these last four weeks of database changes from both the live site and the local site without losing anything on either side. How is this done?

If there have been inserts to both databases, then unfortunately there isn't a good way to merge. If your database contains the latest edits for the Post IDs that are shared then you can export them to XML and then import them into the other site.
This is done with the WordPress Importer plugin which can also be installed by visiting /wp-admin/import.php, the export can be done on /wp-admin/export.php. You can also remove any conflicts from the XML file manually, but make sure that you keep it well-formed.

Related

WordPress WooCommerce Staging Site Database Sync

I manage a WordPress WooCommerce site which has a couple mishaps in the recent past. There is no staging environment setup which would have prevented the mishaps and is not trying to set one up.
I have researched many WordPress DB Sync plugins, however, not many states they work well with WooCommerce. The issue is on my side, the product team can update add/remove products, categories, blog posts, etc. at any given time, they have no set time-frame window which updates the site.
I need a way that I can sync menu structures, products, and all, blog posts, etc. with the production environment. I need to sync, because while the product team is working new orders come in and comments are posted, etc.
Is there any easy way to set up a staging site that will accomplish this?
Daily, I work with MSSQL and write a lot of SQL, so I thought I could write a sync script for moving/syncing data to production, however, the command I needed "MERGE" is not available in MySQL. Or, is there a way WordPress can run on MSSQL?
Any ideas?
My suggestion, you can use default WooCommerce Import and Export available on the Product page on the top side.
It is the best option to save all database in Raw format and easily restore as per your need.

Multiple Website with Single Database and Different urls WordPress?

I was looking to find a solution for making clone websites of my existing WordPress website. the thing is I want to make clones of the website so if one of them will somehow get down the others will be Live. For Example The Piratebay.com they have a lot of clone sites and I you would upload a torrent to one site all of them will have the same torrent available, this is just for example purposes. I want to make a clone of my website so if I add a new post to my any clone website or the original all of the websites will have the same post available on it. For sure they will have their own domain name. The website will use MySql as the form of database. I have searched all over the internet and on StackOverflow as well and couldn't fine a solutuion
Use the same Cloud MySQL database (e.g. Googles Cloud SQL) for all websites. Install wordpress on the first domain and then just copy the wordpress folder to the other destinations (or modify the wordpress-configuration at the other destinations).
Don't use absolute paths for images in your posts etc. (not http://example.com/something/image.jpg).

Can a separate WordPress (same server) get posts from an existing one, but have different settings?

When developing WordPress themes for a site with a large amount of posts, how can I dynamically pull existing post data from the live version of the site onto my testing site? I already know about WordPress's export feature, but that's one-and-done, not dynamically queried.
Plan A:
Proposed Solution:
Create read-only user in live site's database
PRECAUTION: change test site's prefix from "wp_" to "test_"
Problems:
Settings (like current theme) on test site cannot be changed, thanks to read-only user
No posts found in "test_posts", even though I'd like it to search "wp_posts"
Is there an easier way or existing solution to avoid rewriting WordPress system files on the test site? I'd really rather not rewrite WordPress's database interface...
Similar: Linking themes across WP installations
just duplicate the DB, re-name and call DB in wp-config!

Massive Wordpress database migration

This is a doozy of a question...
I am developing a new wordpress website to replace my client's massively sized blog (tens of thousands of pages). Their existing blog is built on a custom PERL blogging platform from 1992...so as you can imagine, it needs updating.
My job is to find the BEST possible way to migrate all of their existing data into a format that wordpress can understand.
The new theme is very advanced, and this job is very advanced as well. After searching for specialists, I can't seem to find anyone who specialized in this field. What would you do in this situation? Thanks!
I've done this before, it's not that hard. I approached it as a wordpress plugin. First get the plugin to connect to the old database and get it to pull the information you need. Then you can use native wordpress function to insert new users, posts, comments, etc.
I did it line by line, which isn't the most efficient approach, but it is the easiest. I used an AJAX front-end to display the conversion status and repeatedly call the converter back-end, as the actual migration took up to several hours.
If the site can't be shut down for that long while you migrate the database, you could either look at doing a proper bulk export/import, or lock old topics and migrate those over first.
My converter was for an old PHP nuke site, and due to the fact that we were using WP-United, I didn't have to worry too much about user credentials and comments. However, the code might help you get started: http://www.wp-united.com/releases/php-nuke-converter
I have done a couple of these Wordpress migrations. The theme you're using in Wordpress is really not that big a deal, most likely. Themes in Wordpress don't ordinarily impact the database structure.
The Wordpress side is easy, it's in MySQL in most cases. The place to start for you would be to determine how the data in the PERL blog is stored. If it's a custom blog solution, there probably isn't a script you can find to do the migration. Hopefully, it's in a data form that will allow you to do a data dump in a format MySQL will allow you to import using something like phpMyAdmin (a popular GUI for MySQL). At that point, you can create a MySQL statement to match up the relevant fields in your old data with those in MySQL. If you're not comfortable doing it and want an expert, the thing to do is find out how the PERL blog stores it's data and find someone who is familiar with both that format and MySQL.

Tool to monitor website(html) changes/to get snapshot

Could you recommend me some tool (not online one) to monitor html changes in website or to get complete snapshot of a website?
My task is to migrate current website to the next version of CMS. Migration requires code changes as well, because of new API. The idea is to make snapshot of the website before migration and after. After that I will compare two snapshots and see if migration went OK.
Thanks
Screen grabs (images)
As your web pages may well extend the visible area of your browser window, you'll need a specialized tool for this. For Firefox, I have made some good experiences with Fireshot. It's not fully automatic though.
Copy of the full HTML structure
For an automated solution, have you considered downloading a complete mirror of the web site? I don't mean the old CMS, but the generated HTML output including all style sheets and scripts. Any dynamic functionality would be lost of course, but it should be possible to create a running, local HTML copy of the whole thing that way. I have used GetLeft in the past. Just be sure everything gets downloaded and there are no references to the online version left anymore.
Why don't you make a copy of the entire website folder and after making the changes use beyondcompare to see what has changed. It has a filter to show only differences which will give you what you need (files that changed).
If you're migrating from one CMS to another, then content is most likely in a Database. Just dump the DB at the desired points, then build quick import script to pull in content and map any changes in DB fields.
Not too long ago I moved a site from an old PERL based CMS to a much nicer Zend Framework-based custom CMS. While the DB tables were quite different, every CMS seems to have commonalities such as Title, Content, Blurb, etc fields. It's just a matter of identifying what matches, building the import script, and running. Once the quick script is written, you could pull in updates in the same manner, allowing you to run a beta of the new code and quickly importing updates that might happen between first import and immediately prior to launch of new codebase.