Bitte aktiviere JavaScript

Um bestimmte Inhalte dieser Seite, speziell die Info-Beschreibungen und Exif-Daten der einzelnen Bilder, sowie weitere Komfortfunktionen dieser Webseite verwenden zu können, muss JavaScript in Deinem Browser aktiviert sein.

This guide helps you to migrate your WordPress blog from a PhotoQ installation into a YAPB blog. For following this guide you will need a few tools: a FTP-program like FileZilla and a MySQL execution progam like phpmyadmin.

Please notice, that you are following this guide at your own risk! I will not be responsible in any way for any damage which may occur during following this guideline!

The pro arguments for following this guideline:

  • the post id and url of the post are the same afterwards. So any link to your post/blog will be valid after the migration.
  • the image description you entered with PhotoQ will be restored into the new YAPB post
  • you do not need to edit each post manually
  • the original image will be used, so any extra information stored in the picture like exif-data can be used by YAPB

What is not possible with or after following this guideline:

  • you will loose the by PhotoQ created image sizes
  • there is no official watermark support with YAPB, but I will publish a new guidline for this in a few days 😉
  • afterwards changed post content can not be restored and are lost (changes in the PhotoQ description (Custom Field) will be notified and saved to the new YAPB post content!)

Before you start with this guideline, I recommend the following steps:

  • Make a full backup of your entire ftp directory for your wordpress installation
  • Make a full backup (with data dump) of your blog MySQL database
  • Install and activate a maintenance plugin for your blog, because it may take a while until it will run properly
  1. Step:
    After you have a backup of your entire blog, you can download the YAPB plugin and activate it in your admin panel. This will create a table called wp_yapbimage. In this table are stored, the post id and the location of the image. The location of the YAPB images is in the /wp-content/uploads directory, therefore you have to change the location of the original images.
  2. Step:
    Moving the images physically into the right directories. PhotoQ saves the uploaded images into the /wp-content/original directory. This directory could be an another directory if you have activated the “Hide original directory” option in PhotoQ. As an example you have to move the images from /wp-content/original/2012_04 into the /wp-content/uploads/2012/04 directory.
  3. Step:
    Now you have to fill the YAPB table with the image values. Like mentioned above you will loose any size created with PhotoQ and the watermark functionallity.
    /www/htdocs/blog must be set by yourself to the prefix of your /wp-content directory. The reason: PhotoQ uses the absolute path, but YAPB only the path from /wp-content. You can get the prefix through phpmyadmin or through your ftp program.

    INSERT INTO `wp_yapbimage` (post_id, URI) 
    SELECT post_id, REPLACE(meta_value, '/www/htdocs/blog', '')
    FROM `wp_postmeta` 
    WHERE meta_key="photoQPath";
  4. Step:
    After you have filled the YAPB table, the location path of the images in the table have to be set to the new location. As an example original/2012_04 has to become to uploads/2012/04, so YAPB can process the images.
    original must be set by yourself. It is the directory in which PhotoQ saves the uploaded original images. The default value is original.
    The sql query below have to be repeated for each year, where you have uploaded images with PhotoQ. But please do not forget to change the year in the query 😉

    UPDATE `wp_yapbimage` 
    SET uri = REPLACE(uri, "original/2012_", "uploads/2012/");
  5. Step:
    Afterwards you have to overwrite the post content with the PhotoQ description. If you ask why: PhotoQ generates the post content with the image, description, exif data and additional informaions which you do not need with YAPB.
    Caution It may happen, that the following sql query will clear the content of text posts. This only happen at the last published post version, so any earlier saved post version will not be affected. But hey, this blog should become a photo blog and not a text blog 😉

    UPDATE wp_posts, wp_postmeta 
    SET wp_posts.post_content = 
      (SELECT wp_postmeta.meta_value 
      FROM `wp_postmeta` 
      WHERE meta_key="photoQDescr" 
      AND wp_postmeta.post_id = 
    WHERE wp_postmeta.post_id = 
    AND post_type = "post";

With this steps you have successfully migrated your PhotoQ blog into a YAPB blog. Do not forget to change your theme, so the YAPB posts will be showed properly.

Tags: , , ,

Leave a Reply