Hi I would like a list of all titles and urls from a WordPress database - is there someone who can create an SQL command for this?
Based on the WP DB schema: SELECT post_title FROM wp_posts; SELECT link_url, link_name FROM wp_links; Code (markup): If you don't want the name of the link, just remove it from above. I can't see a way in which wp_posts are linked to the wp_links table so I help this helps.
Have you tried downloading a copy of your database (maybe via SSH) and then doing the queries then? Or perhaps changing some server settings to allow for longer queries?
This work <? require_once("wp-config.php"); $dbname = constant("DB_NAME"); $dbuser = constant("DB_USER"); $dbpassword = constant("DB_PASSWORD"); $dbhost = constant("DB_HOST"); $tablename = "$table_prefix"."posts"; $connect = mysql_connect("$dbhost","$dbuser","$dbpassword"); mysql_select_db("$dbname"); $spostsprint = mysql_query("SELECT ID,post_title,guid FROM $tablename ORDER BY ID"); WHILE($postsprint = mysql_fetch_array($spostsprint)) { $titleprint = utf8_decode($postsprint[post_title]); print"$titleprint,$postsprint[guid]<br />"; } ?> PHP: