Technology Insights

Update WordPress Amazon Product in a Post Plugin 2.X to Amazon Product in a Post Plugin 3.X

If you use the Amazon Product In A Post Plugin on WordPress you might have either not upgraded yet or decided to not upgrade because the shortcode syntax has changed. You can get around not upgrading by updating the WordPress post content immediately after you upgrade the Amazon Product In A Post Plugin. Below I describe the version that I upgraded and the MySQL syntax used to update the shortcode syntax to display Amazon products in WP posts.

Technology Insights

MySQL Command To Update Just The Matching Part Of A Column

Earlier I set up a development WordPress site that mirrored a live WordPress installation. To do this I dumped the entire WordPress database using mysqldump and then imported it into a new database with mysql. Among other things that needed to be changed I needed to update any links that referenced the live site’s URL with the development site’s URL. Below I provide the command to make such an update to only a matching portion of a column in row located in a MySQL database.

Technology Insights

How to Update WordPress Blog URL

Below are a couple simple steps to update your WordPress blog’s URL. The below is valid if you are simply switching the URL using the same domain or if you are changing the WordPress domain all together. You will run into problems if you do not make sure to update each item.

  1. Update WordPress SiteURL: In the database table wp_options make sure to change siteurl to the new URL. This should be the first row in the wp_options table.
  2. Change Blog Address: Under “Settings” and then “General” change the “Blog Address” to the new URL.