Cannot complete migration on LAMP

I was able to solve the problem by adding these two lines to /var/www/my-wp-site.com/public_html/wp-config.php: define( ‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] ); define( ‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] );

Why is the domain name missing from the logout redirect?

I have traced the problem to this code in wp-login.php: case ‘logout’ : check_admin_referer(‘log-out’); $user = wp_get_current_user(); wp_logout(); echo “hello”; echo $_REQUEST[‘redirect_to’]; if ( ! empty( $_REQUEST[‘redirect_to’] ) ) { $redirect_to = $requested_redirect_to = $_REQUEST[‘redirect_to’]; } else { $redirect_to = ‘wp-login.php?loggedout=true’; $requested_redirect_to = ”; } It appears if I change this line: $redirect_to = ‘wp-login.php?loggedout=true’; … Read more

WordPress: get recent posts, delete the current category

Assuming you are using custom query to fetch the latest posts from other categories. In that case, you don’t need to hook into pre_get_posts as the category__not_in parameter can be passed directly into the query arguments. //Get the current category ID $catID = get_queried_object_id(); //Pass it to the Query arguments $args = array( //Your other … Read more

How can we take into account post types when constructing permalinks?

When you register your taxonomy you can create the rewrite rule for the slug register_taxonomy(‘investment_country’,array(‘investment’), array( ‘hierarchical’ => true, ‘labels’ => $labels, ‘show_ui’ => true, ‘query_var’ => true, ‘rewrite’ => array( ‘slug’ => ‘country’ ), )); so whenever I’m showing something that I have included in the country taxonomy I get http://www.domain.com/country/unitedkingdom for example don’t … Read more

How to configure apache to create files with correct group owner [closed]

You may as I have found need to change the group that apache runs under. In ubuntu you can do this by editing the /etc/apache2/envvars file. The above answer by AlxVallejo is mostly correct but this (Tom’s) is a better answer with regards to setting permissions https://serverfault.com/questions/6895/whats-the-best-way-of-handling-permissions-for-apache2s-user-www-data-in-var Also I found that even when you do … Read more