Delete all users meta that named: user_avatar
Is this what you are looking for? DELETE FROM jnkdadb7a_usermeta WHERE meta_key=’X’;
Is this what you are looking for? DELETE FROM jnkdadb7a_usermeta WHERE meta_key=’X’;
you have the new database selected, then run some sql updates and replacement commands on the tables notably, wp_options, wp_posts, wp_postmeta. UPDATE wp_options SET option_value = replace(option_value, ‘https://livesite.com’, ‘http://localhost/sitename’) WHERE option_name=”home” OR option_name=”siteurl”; UPDATE wp_posts SET guid = replace(guid, ‘https://livesite.com’,’http://localhost/sitename’); UPDATE wp_posts SET post_content = replace(post_content, ‘https://livesite.com’, ‘http://localhost/sitename’); UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘https://livesite.com’, … Read more
This should be solved by http:// in front of site_url and home in the wp_options table of your database. You can try adding below in wp-config.php define( ‘WP_SITEURL’, ‘http://subdomain.example.com’ ); define( ‘WP_HOME’, ‘http://subdomain.example.com’ ); For more details follow this link hope this will help.
Depends on how many users you have, but it’s probably fine. You could also just keep a running count of comments made by registered user, and add when they comment / subtract when a comment of them gets deleted or rejected / marked as spam.
Here’s the solution guys, Steve from SkyVerge helped me figure it out, sorry for no editing it’s 2am and i’m super tired: Hi Steve, It looks like the problem is now fixed.I t was not necessary to change the ‘allow guest login’ as the problem was something else in the end. After much figuring out … Read more
Improving performance of SQL sub-queries in WordPress
Your problem is most likely not the size itself but how queries are being done. This could be a result of non optimal code or bad DB structure. As with all optimization you first need to find the actual bottle necks and than to decide if you fix the code, or maybe just scrap the … Read more
If you just want the ID of the requested post within the template, get_queried_object_id() will give you that. If you want to modify the main query SQL before it’s executed, there are a number of filters that let you directly modify the SQL.
2 $wpdb queries causing error Table ‘wp_postmeta’ is specified twice, both as a target for ‘UPDATE’
You should gotten return from SQL first. And then print results. Use $wpdb class for SQL queries. If you wanna use native SQL queries something like this might helps you $result = mysql_query(“SELECT * FROM table”); $result_array = mysql_fetch_array($result, MYSQL_ASSOC); But it`s very bad idea. Use $wpdb with preparing.