Changing siteurl in the database not working

WordPress has a number of standard methods to change or override these url options: using update_option() function in functions.php or anywhere else in the code, this way: update_option( ‘siteurl’, ‘https://yourdomain.com’ ); update_option( ‘home’, ‘https://yourdomain.com’ );This is most likely your case because update_option() edits db entries at runtime. In this case, just remove or comment out … Read more

How can I clear memcached WordPress site options by hand?

The variable in my copy of wordpress on the line your error indicates is actually $current_site as opposed to $current_blog (I may have a newer version of WP). I believe you can clear that by changing the value of the option_name “siteurl” or “blogname” in your wp_options table on your database.

URL problem: www.sitename.com/blog and www.sitename.com/learn using same WP installation

Not sure I exactly understand your problem, but it sounds like what you want to do could easily be accomplished using Custom post types: http://codex.wordpress.org/Post_Types#Custom_Types This would basically allow you to have an entire segment just for ‘learn’ completely separated from your general posts/blog – you could even give ‘learn’ it’s own styling by using … Read more

Get logged in username in wordpress url

I think this will do what you are looking for. add_action(“template_redirect”, ‘template_redirect’); function template_redirect() { global $wp; if(is_user_logged_in() && !isset($_GET[‘user’])){ $current_user= get_userdata(get_current_user_id()); wp_redirect(add_query_arg(array(‘user’=>$current_user->user_login),home_url($wp->request))); die(); } }