get csv of users with user_meta

SELECT u.ID, u.user_email, u.display_name, um1.meta_value AS first_name, um2.meta_value AS last_name, um3.meta_value AS phone_number, um4.meta_value AS salutation, um5.meta_value AS title FROM wp_users u LEFT JOIN wp_usermeta um1 ON u.ID = um1.user_id AND um1.meta_key = ‘first_name’ LEFT JOIN wp_usermeta um2 ON u.ID = um2.user_id AND um2.meta_key = ‘last_name’ LEFT JOIN wp_usermeta um3 ON u.ID = um3.user_id AND … Read more

Creating a CSV with PHP inside the plugin directory

If you plan to write to a pugin folder since you used fopen, fwite, flose you are using the wrong function: File: wp-includes/link-template.php 3189: /** 3190: * Retrieves a URL within the plugins or mu-plugins directory. 3191: * 3192: * Defaults to the plugins directory URL if no arguments are supplied. 3193: * 3194: * … Read more

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

Pulling Data from CSV vs. pulling data from database

Reading, searching and closing a file every time the page is loaded is highly time consuming. Database systems are highly optimized for reading and writing huge amount of records, querying data, providing schemes, relations between the data etc. What will happen if 10K users hit the taxonomy page? How you will handle the updates of … Read more

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