Skip to content

WordPress Plugin(WPSiteSync for Content) Bug fix

WordPress Plugin ( Version 1.3.1 does not work well. Here is some solution to make the code through without license.(Really waste time to fix this plugin)

In file classes/apirequest.php Line 710 better be:

'post_status' => 'inherit',

Following code will upload all related attachments to the new site.

However it’s NOT compatible with Attachments Plugin.

And also has lots of bugs. So the following code is not recommended:

foreach ($post_children as $child_id => $child_post) {
  $attach_id = $child_id;
  if($attach_id != 0)
       $this->send_media($child_post->guid, $post_id, $post_thumbnail_id, $attach_id);

And same file Line 716 -> Line 789 has a HUGE logic bug! what if the image is just an external link? and what if image is not added by Add Media then class attribute does not generate? and what if image is just a base64 code?

Actually Line 716 -> Line 789 can be removed if you DO NOT need upload files to new site.
Meanwhile, you should also remove line 330 in file classes/apicontroller.php.
Then links(images) will become external links referred to the old site’s media library.

Published inBugs

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *