Working on live sites locally

It looks like you’re connecting to the live database from your local machine. Not many hosts allow remote connections to the database by default. You may have to request this type of access from your host. Also, it’s highly recommended you work with a local copy of your database instead of connecting (and possibly changing) … Read more

Using page-id-{ID} from body_class() in local dev, versus live staging

You could use slugs instead of IDs. Taken from the Starkers theme (add it to your functions.php): add_filter( ‘body_class’, ‘add_slug_to_body_class’ ); function add_slug_to_body_class( $classes ) { global $post; if( is_home() ) { $key = array_search( ‘blog’, $classes ); if($key > -1) { unset( $classes[$key] ); }; } elseif( is_page() ) { $classes[] = sanitize_html_class( $post->post_name … Read more

Redirect loop error on wordpress landing page on localhost

I for instance have MAMP pro running with custom development URLs like project.dev. When I created the one-click installation of WordPress through MAMP, it automaticly entered the port-number into WordPress as well. I don’t think WordPress likes when the port-number is :80 which is standard. Removing the port-number from WordPress Address and Site Address did … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)