Search and Replace in Windows XAMPP site

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

WordPress URL error for links

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.

How to write in MySQL more characters in user_nicename

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

Database size for news publishers?

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

Is it possible to utilize custom SQL for a single-post.php?

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.

query sql-table and change entities

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.