Update references to pictures on website after moving to new URL

Besides doing a custom query in your MYSQL database, I’ve found this little script to be helpful in my development process, and I’ve incorporated into my regular workflow to keep my local, development and production servers synchronized: https://github.com/interconnectit/Search-Replace-DB Just be sure to read the documentation, especially about overwriting GUID values and also make sure to … Read more

Inserting into data into external DB using WPDB

You are using $wpdb incorrectly Take a look at these lines: $row = $newdb->get_results(“SELECT * FROM chi_clients WHERE accountNum=’$acctNum'”,ARRAY_A); $name= $row[‘lastName’] . “, ” . $row[‘firstName’]; $wpdb->get_results is going to return an array of “rows”. It is going to multidimensional. You are treating it like it has returned a one-dimensional array. That is, this (completely … Read more

Using class id from array for query

Try this after your $wpdb query: // collect calendar id’s $ids = array(); foreach( $calendar_entries as $calendar_entries): array_push( $ids, $calendar_entries->id ); endforeach; // query the above calendar id’s $args = array( ‘post_type’ => ‘post’, ‘post__in’ => $ids, ‘orderby’ => ‘id’, ‘order’ => ‘DESC’ ); $query = new WP_Query( $args ); You can also modify the … Read more

Changing database links has no effect

I can’t tell exactly what you are asking but this comment… What I did recently is that I created a wordpress dir on FTP server and move stuff there, but now people would have to input mydomain.com/wordpress to access my webpage… … makes me wonder it you don’t have a subdirectory install. If that is … Read more