Merge two wordpress sites

You can always divide the exported CSV file into parts and then import it on the other site. A better option will be if the other site has comparatively less data then you can export it and import it on the first site and then perform a database switch. I am not sure if any … Read more

Pull specific data from CSV

You can let the client to upload csv file. After upload you can read csv file with a php function (maybe fgetcsv) and put columns and rows to table (maybe with dataTables jQuery plugin). If you let the user to edit table, you can use these information for create a form After that you can … Read more

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