How to modify admin headers

Not a direct answer, but: for simple data exports on the admin side, I generally just use the AJAX API. Set up an AJAX handler for your export: /** * export from admin */ function wpse_126508_export() { header(‘Content-Type: text/xml; charset=utf-8’); header(‘Content-Description: File Transfer’); header(‘Content-Disposition: attachment; filename=wpse_126508_export.xml’); $xml = new XMLWriter(); $xml->openURI(‘php://output’); $xml->startDocument(‘1.0’, ‘UTF-8’); $xml->startElement(‘wpse_126508_export’); // … Read more

Moving WordPress site to an existing WordPress site

You’re probably looking for the export/import tools. From the dashboard you can use the export tool to create a file with all the blog posts, comments and users from one blog, and then your other install use the import tool to merge them into the blog you wish to keep. You can map old users … Read more

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

Export SQL query based on post type

In your WordPress Dashboard, if you go to Tools > Export, you can select your custom post type and export only posts in that post type. It gives you the option between All Content, Posts, Pages, and your custom post types following those three options. As for SQL, well are you looking to export the … Read more

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