update user information

You’re not closing the first if tag. /* Update user information. */ if ( !empty( $_POST[‘url’] ) ){ update_user_meta( $current_user->id, ‘user_url’, esc_url( $_POST[‘url’] ) ); } else{ delete_user_meta( $current_user->id, ‘user_url’); } Also, you should use esc_url_raw on a raw url and then if you’re echoing into the html use esc_url. You also shouldn’t save esc_attr … Read more

Moving local wordpress page to a real server subdomain broke my permalinks?

You have to change other URLs in the database, not just in the wp_options tables. Use these queries in phpmyadmin to change post links and metadata within post and page content: UPDATE wp_posts SET guid = replace(guid, ‘http://www.olddomain.com/’,’http://www.newdomain.com/’); UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.olddomain.com/’, ‘http://www.newdomain.com/’); UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘http://www.olddomain.com/’, ‘http://www.newdomain.com/’); Reset … Read more

Does WP read itself?

The user agent you are seeing in logs is consistent with defaults of WordPress HTTP API: ‘WordPress/’ . $wp_version . ‘; ‘ . get_bloginfo( ‘url’ ) You can verify that requests are coming from your WordPress installation by using Core Control plugin’s HTTP logging module. But from this information it is impossible to say why … Read more

Too many connections to server

I contacted my hosting provider to solve this problem and they claim that my wordpress is generating too many simultaneous connections to server… The only times I’ve seen hosts put limits on the number of MySQL connections is when the host is free or very cheap or incompetent. Is it free hosting? It’s really easiest … Read more

Site running slow on new server?

Your site is very, very heavy at 4+ megs. Lighten it up; see http://gtmetrix.com/reports/www.moseleycoachsales.co.uk/eyz4qxQx Fix the code errors, such as not specifying image dimensions, not correctly scaling your images, not optimizing your images, setting browser caching and expires headers, etc. Your site speed has very little to do with one 404 for one style sheet. … Read more

Preserve Domain Alias

You need to set the canonical hostname (ie. with www) in the WordPress dashboard… Under Settings > General and set the appropriate “WordPress Address (URL)” and “Site Address (URL)” properties. Alternatively, these values can be hardcoded in wp_config.php by defining the WP_HOME and WP_SITEURL constants respectively. Reference: https://codex.wordpress.org/Changing_The_Site_URL SSLOptions +StrictRequire SSLRequireSSL SSLRequire %{HTTP_HOST} eq “example.com” … Read more

External cron job firing too many times

You might be calling wp-cron.php every 15 minutes, but your cron task is set to happen every 5 minutes! $schedules[“5min”] = array( ‘interval’ => 5*60, ‘display’ => __(‘Once every 5 minutes’)); … wp_schedule_event( time(), ‘5min’, ‘isa_add_every_five_minutes’ ); Change it instead to every 15 minutes