How can I import an excel column into wordpress database?

There is some way to import excel to WordPress database. but I have an easy solution to import this file. Go to convertcsv.com and convert your excel file to JSON. Create the below files and folders: Folder: wp-content/plugins/import/ File: wp-content/plugins/import/import.json File: wp-content/plugins/import/import.php Then save JSON file to import.json Put below code in import.php . /* … Read more

connecting to DB from custom php file

You’re must load WP-load function To do that you need to require wp-load file, so if, your custom file is in theme it shoudl look like somethink like that: $wp_load = ‘../../../../../wp-load.php’; if ( file_exists( $wp_load ) ) { require_once( $wp_load ); }else{ die(‘no-load’); } You could also set const SHORTINIT to true to minimalize … Read more