WordPress CSV Importer takes a long time to finish

This need some server side tune ups. In general the import timing depends on no of attributes imported per post. In particular handling media files like inline images within post, featured image etc. In case of https://wordpress.org/plugins/wp-ultimate-csv-importer, we have an option like no. of post server requests to balance the server load, memory and execution … Read more

keep wp_insert_post from adding duplicates

The problem ended up being the hook after_setup_theme. I was effectively invoking the function by refreshing the browser which launches the hook in both Javascript and PHP so the hook was being triggered more than once when the browser was refreshed. Once I disabled Javascript everything worked fine. Another solution would have been to use … Read more

How to bulk add vast amounts of posts

Try the following: Right click on this link and save the XML full of dummy content provided by WordPress In the sample data, you can remove the unwanted data such as pages, comments, categories, etc. Go to Tools > Import in the admin panel Install the “WordPress” importer from the list Activate & Run Importer … Read more

Importing CSV into database table not working?

You can use Load data infile MySQL Query instead of looping through each entry. Doc: https://dev.mysql.com/doc/refman/8.0/en/load-data.html For example: $wpdb->query( $wpdb->prepare( “LOAD DATA LOCAL INFILE %s INTO TABLE sas FIELDS TERMINATED BY ‘,’ ENCLOSED BY %s IGNORE 1 LINES (@category,@temple) SET category = @category, temple = @temple;”, $_FILES[‘file’][‘tmp_name’], ‘”‘ ) ); Make sure that fields from … Read more

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