How to make bulk changes to wordpress posts

Why not change your site’s htaccess file to include this code RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L] …changing to your domain name. This takes all port 80 requests (http) and rewrites them to https. Then, make sure that the wp_options table has the https URL for your site in both locations. There … Read more

Trouble migrating custom post types from non-wordpress cms

I was able to come up with a solution according to advice from the comments. Working code: function import_shows() { $olddb = new wpdb(constant(“DB_USER”),constant(“DB_PASSWORD”),”THE_DB”,constant(“DB_HOST”)); $sql = “SELECT * FROM shows”; $rows = $olddb->get_results($sql); foreach($rows as $obj) { error_log($obj->name); } return; }

Import download attachment from woocommerce product

Here is the solution i’ve found : in wordpress-importer plugin function process_posts : // try to use _wp_attached file for upload folder placement to ensure the same location as the export site // e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload() $postdata[‘upload_date’] = $post[‘post_date’]; if ( isset( $post[‘postmeta’] ) ) { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)