Archive for the ‘ Wordpress ’ Category

Publishing failed. You are probably offline.

Posted by

When adding a new WordPress Post or updating an existing WordPress Post you get the following error:

Publishing failed. You are probably offline.

This might happen if you use Cloudflare for your SSL.

To fix do the following:

From WordPress Admin click on Settings > General

Check that the WordPress Address (URL) and Site Address (URL) are the same as what you see in the browser address bar:

Browser address bar:

Hint: You might be missing the S after http:// e.g. if the WordPress Address is showing change this to

WordPress one-click installer up to 4.5.2

Posted by

We’ve updated our WordPress one-click installer to automatically install WordPress 4.5.2.

Your customers will now have the latest version of WordPress right away, with no need to update their fresh installations.

Please make certain that your current WordPress-using customers have updated their WordPress, as the most recent update fixed major security issues.

One Click Installation of WordPress

Posted by

WordPress is arguably the most popular blogging software available today! It’s easy to install and will allow you to have a great looking, easy to use blog in minutes.

Version 3 allows you to choose to install a single blog or to have multiple WordPress blogs on a single website. Multiple blogs are more demanding on the administrator than a single blog so if you plan just a single blog choose that option.

1. Login to your control panel through

2. Scroll down to CGI Scripts and click on WordPress Blog.

Screen Shot 2014-06-05 at 19.49.41

3. Either enter the directory that you want WordPress installed to or if you want it installed to the root of your domain simply leave this field blank.

Screen Shot 2014-06-05 at 19.49.58

4. Click Install Now

5. After around a minute WordPress will be installed and when you go to the URL that you installed WordPress on you will be able to run through the initial configuration.

If the installation gave an error its most likely because the directory you tried to install in was not empty. If you still get stuck feel free to contact Switchweb support.

WordPress Feed Invalid Char

Posted by

When you open your WordPress sites RSS feed in the browser you get the following error:

“WordPress Feed Invalid Char”

The error will also show you the the line number of the error.

View the source of the feed and go to the line of the error. Find the corresponding post in your WordPress admin.

Copy the title and body into notepad (note this will remove all formatting).

You will be able to see the non UTF8 characters in notepad and be able to delete them. You can then copy and paste the problem text back into WordPress.

The offending characters won’t show in the WordPress admin hence having to copy into notepad.

WordPress Pages & Posts not showing

Posted by

If when you load the wordpress admin none of your pages & posts are showing, do the following:

  1. Edit wp-config.php and add
    define('WP_ALLOW_REPAIR', true);
  2. Open the database repair URL

This should force an upgrade of the database. Remember to remove the line from wp-config after running the upgrade.

Find Most Recent Comments

Posted by

To find the most recent comments in WordPress use the following code:

$number=30; // number of recent comments desired
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number");
if ( $comments ) : foreach ( (array) $comments as $comment) :
echo sprintf(__('%1$s on %2$s'), get_comment_author_link(), '' . get_the_title($comment->comment_post_ID) . ' - ') . $comment->comment_date;

Find the most recent posts from a specific category

Posted by

In WordPress sometimes you will want to show the most recent post from a specific category.

To do this use the following code:

global $post;
//change the category=1442 to the category number you want to pull the content from
//change numberposts=1 to the number of posts you want to return from the category
$myposts = get_posts('numberposts=1&category=1442&order=DESC');
foreach($myposts as $post) :
$catpost= " ". get_the_title() ."";

echo $catpost;