How to Mass Delete Comments From WordPress Using phpMyAdmin

Have you been inundated with spam comments
on your Word Press Blog?

Recently I helped a customer that had accumulated over 4000 spam comments on her blog. She tried removing them from the Word Press dash board however it only removes 20 comments at a time. This would take forever because there multiple pages of comments to delete.

Here are the steps to mass delete comments from
your Word Press database using phpMyAdmin:

1. Go to phpmyadmin in your cpanel

This is the management panel that comes with your hosting account if it uses the Apache environment. Once you’re logged in cpanel click on the mySQL databases icon then click on the phpmyadmin link at the bottom of the page.

2. Click your Word Press database link

This is located in the top left and will display all the data in tables.

3. Remove all comments

If you want to remove all comments check the wp_comments table then in the drop down box select empty then press go. Remember this will remove both approved and unapproved comments.

How to remove unapproved comments and keep the approved comments

1. Back up your database – this is to make sure you can restore all your files should you make a mistake. To do this click on your database, click export, make sure all your tables are selected, check SQL, click save file, click go. Follow the rest of the screen prompts to download the database to your computer. You can save it as a text or zipped file.

2. Click on the comments table. ( You can click browse to view all the approved and unapproved comments).

4. Click the mySQL tab. This will open up a query box. Delete the default query and type in:

DELETE FROM wp_comments WHERE comment_approved = 0

Click go
This will delete all the 4000 unapproved comments

5. Remove overhead. These are fragments still left in the database that must be removed. To delete them go to ” check all tables with overhead”, select “optimize table” from the drop down box.

Your database size will now be reduced because you’ve removed the 4000 unapproved comments.

If you check your blog you’ll notice all the comments have disappeared.

Tip
To prevent spam from accumulating install the activate the Akismet plugin. This is a spam filter which allows you to mass delete comments within the Word Press administration panel.

Here’s a video tutorial showing how to use phpmyadmin to remove WP Spam Comments:

How to Optimize Your Word Press Blog

Read my previous article if you want to learn How to Start a Blog

If you want to attract search engine traffic and get thousands of visitors to read your content you need to optimize the structure and content of your Word Press Blog.

7 Steps for Optimizing Your Word Press Blog Structure

The plugins below are highly recommended as they save you lots of time, no knowledge of coding is necessary and it’s easy to accomplish.

1. Install the headspace plugin

HeadSpace 2

This plugin allows you to easily add titles and descriptions to your posts and pages.

2. Install the Google Sitemaps plugin.
http://www.dagondesign.com/articles/sitemap-generator-plugin-for-wordpress/

A site map provides a way for Google to index all your pages. It functions similar to a table of contents so your visitors can also view the contents of your glob without scrolling through all the categories. The site map plugin submits your pages automatically to Google whenever you create new posts on your blog.

3. Install the Google XML Sitemaps generator plugin

http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/

This plugin will generate a sitemaps.org compatible sitemap of your WordPress blog which is supported by Ask.com, Google, MSN Search and YAHOO. It helps Google to index and crawl your pages better which may result it attracting more visitors from the search engines.

4. Install the similar posts plugin

Similar Posts

The beauty of this plugin is that it helps visitors to stay longer on your blog. After a visitor reads your post they can view other content related to it. It displays a highly configurable list of related posts. Similarity can be based on any combination of word usage in the content, title, or tags.

5. Create a permalink structure

The basic Word Press installation will display the pages with unfriendly URLs in the browser. This means the URL will have a bunch of numbers after it. It not makes them hard to remember should a visitor try to type it into their browser but it makes it more difficult for search engines to index your pages.

To change your permalink structure you need to login to your WordPress admin panel, then go to Options > Permalinks. Choose custom. To create a permalink structure like
http://www.myblog.com/category/postname.php enter the following code:

/%category%/%postname%/

If you prefer a permalink structure like http://www.myblog.com/postname.php enter:

/%postname%/

6. Add a newsletter sign up form

You’ve probably heard “the money is in the list”. If you have a large list of subscribers you can send a newsletter to them every 2 weeks thereby keeping in touch with them. From time to time you can promote your products to them and make money from your list.

To add a contact form to your blog download and install this plugin:
http://chip.cuccio.us/projects/contact-form-ii/

7. Allow visitors to comment on your content.

To encourage visitors to comment on your blog posts make sure you enable comments in the admin panel. To do this login to your admin panel then go to: settings-discussion settings and check the boxes for allowing comments.

Now you’ve taken the 7 steps to optimize your Word Press Blog Structure you need to optimize the content of your blog.

How to Start a Blog – Setting up Word Press

If you want to know how to start a blog Word Press is software that is freely available and often included in your hosting plan.

To read my previous article on the 7 benefits of starting a Word Press Blog visit: How to Start a Blog

7 steps for setting up your Word Press blog:

1. Register a domain name and set-up a hosting account.

Visit http://www.isitebuild.com/sitehosting.htmto get a domain name and sign up for a hosting plan. The reason I suggest going here is that you will receive personal attention and have everything “under one roof” so any technical problems can easily be solved.

2. Install WordPress

Within your hosting account manager you will find a link to Fantastico. This allows you a one click installation for your Word Press blog.

If you wish to install it manually please read Word Press Installation

3. Choose a template

The default installation of Word Press provides a basic template however you can view 1000s of free templates at: http://wordpress.org/extend/themes/Here’s an article on How to Select a Word Press Theme.

4. Customize your blog.

The reason you may want to customize your blog is so that it clearly reflects your particular online business and makes I stand out from 1000s of other free templates. For example you may want to change the header graphic or set-up a blog that looks more like a web site. Here are the steps I took to customize a blog theme for a client:

5. Theme your content

Instead of haphazardly writing about anything, choose a theme that you’re passionate about so you’ll be able to write lots of content without getting bored. There are lots of blogs on the Net that have been abandoned. It takes a solid commitment to create a online business that is profitable. Create a list of topics that tie into your theme then segment those topics for writing your blog posts.

6. Set up categories, links and pages

After logging in to Word Press (version 2.7+) you’ll see a vertical dashboard where you can easily add categories, links, posts and pages based on your theme. You are almost ready to start blogging now however I suggest optimizing your blog for the search engines so you can attract lots of visitors to read your content.

7. Optimize your blog

Optimizing your blog consists of installing plugins, creating search engine friendly URLs, and writing lots of optimized content on a regular basis. I’ll go into more details about this in the next section.

***************
Learn the step-by-step formula to start and build a money-making blog
by picking up a copy of WordPress Goldmine

* Provides you with a money-making formula that has been tested and proven to work
* Is inexpensive and provides you with the results you’re seeking
* Is like no other Internet marketing product, course, or membership on the market today
* Provides you with the blue print to building your very own Internet marketing empire even if you know absolutely nothing about marketing right now.

How to Start a Blog – Top 7 Benefits of Word Press

One of the easiest ways to get a web site online is to start a blog. You can sign up for a free one at WordPress.com however I highly recommend getting a real domain name and getting it hosted so you’ll have much more control over it.

Top 7 Benefits of a Word Press Blog

Word Press is the best platform for starting a blog as it includes a large community from which you can get help any time you need it.

1. No need to learn html

WordPress has an editor built into it that functions similar to Microsoft Word however it’s a little simpler.

2. Keep content separate from design

This allows you to change the design whenever you like without affecting the content.

3. Create unlimited pages

WordPress is database driven. This means you can easily add 1000s of pages to the database.

4. Choose from many templates

There are 100s of free and paid templates to choose from. These can be customized to suit your business web site. You can also get a custom built blog by hiring an experienced web designer.

5. Search engine friendly

Word Press blogs can be easily optimized for the search engines using plugins. Posts on your blog are automatically pinged and RSS feeds are automatically submitted to RSS directories.

6. Integrate social media marketing

Blog posts can automatically be sent to social marketing sites (ie twitter, facebook etc) by installing the appropriate plugins.

7. Active forum support

WordPress.org runs a very active community forum where you can ask questions related to the functioning of your Word Press Blog.

***************
Download this free guide How To Start A Blog
The beginner’s guide to successful blogging

Secure WordPress – How to prevent your blog from being hacked

Recently I received a call from a client who had the front page of her wordpress blog hacked. Hidden in the source code was hundreds of links to spam sites. As a result of this Google removed her blog pages for 30 days. She was upset because she had not caused this and her blog pages had some top rankings that attracted a lot of traffic.

Obviously she did not have a secure WordPress version.

Here is what Google said:

While we were indexing your webpages, we detected that some of your pages were using techniques that are outside our quality guidelines, which can be found here: http://www.google.com/webmasters/guidelines.html. This appears to be because your site has been modified by a third party. Typically, the offending party gains access to an insecure directory that has open permissions. Many times, they will upload files or modify existing ones, which then show up as spam in our index.

In order to preserve the quality of our search engine, we have temporarily removed some of your webpages from our search results. Currently pages from your blog are scheduled to be removed for at least 30 days.

We would prefer to have your pages in Google’s index. If you wish to be reconsidered, please correct or remove all pages (may not be limited to the examples provided) that are outside our quality guidelines. One potential remedy is to contact your web host
technical support for assistance. For more information about security for webmasters, see
http://googlewebmastercentral.blogspot.com/2007/09/quick-security-checklist-for-webmasters.html.

What I did to Secure WordPress

1. Removed all spam links from posts and pages.

If you have phpmyadmin, you can scan your posts for links to that particular spam domain, which might make it easier to see which posts have the spam in them. Typically spammers only touch about a half a dozen or so posts per blog, but sometimes more.

2. Upgraded WordPress Blog to the latest version.

Read “10 Steps for Upgrading WordPress

According to the folks at the WordPress Forum the version she had been using contained many security holes.

Resources

How to harden WordPress
http://codex.wordpress.org/Hardening_WordPress

The Ultimate WordPress Security Guide – Step by Step (2017)

9 easy ways to secure your WordPress Blog
http://www.simplehelp.net/2007/09/10/9-ways-to-secure-your-wordpress-blog/

WordPress Security White Paper

http://blogsecurity.net/wordpress/wordpress-security-whitepaper/

Secure Form Mailer Plugin
http://www.dagondesign.com/articles/secure-form-mailer-plugin-for-wordpress/

WordPress Security – 19+ Steps to Lock Down Your Site
https://kinsta.com/blog/wordpress-security/

*****************************************
Receive fresh, in-depth articles articles on how to design, optimize and promote your web site by subscribing to my “Marketing Tips” newsletter at: http://www.isitebuild.com/

Herman Drost is the Certified Internet Webmaster (CIW)
owner and author of Web Site Design, Web Hosting, Search Engine Optimization

Blog Customimization – How to Customize Your Word Press Theme

Do you prefer a customized blog that ties into the theme of your business?

There are many Word Press themes you can easily install for a Blog however many people want a design that is unique to their subject and prefer to have some input as to what it will look like. You can’t do this if you just grab one of the free themes online without it being customized to suit the desires of the owner.

Recently a client asked if I could create a 3 column web site (blog) . These are the customizations he wanted:

1. New header banner
2. Links, Categories and Admin in the left sidebar
3. Search box and Ads (or Google Ads) in the right sidebar
4. Widen the right sidebar
5. No evidence of comments on the web site
6. Different colors for the template and content backgrounds
7. Change footer color and text
8. Change navigation bar links from brown to white
9. Add a contact form
10. Optimize the blog for the search engines

Here’s is how I proceeded with the customization:

I began with the installation of the downtown-java-3column theme
http://www.briangardner.com/themes/downtown-java-wordpress-theme.htm

Changing the style

1. I created a new header banner with the same name and dimensions as the original then replaced it on the server. I adjusted the height of the header in the header section of the CSS and adjusted the font size of the header text (#header a)

2. I changed the template background by editing CSS body

3. I changed the content body by editing the CSS #wrap

4. I changed the footer color by editing CSS #footer and edited the text in footer.php within the template files.

5. I widened the right sidebar (#r_sidebar) by increasing it from 180 pixels to 190 pixels
then reduced the CSS ID…#contentleft from 500 pixels to 490 pixels. This means the client can now place wider ads in the right sidebar.

6. I changed the navigation link colors from brown to white by editing the color in #navbar ul li a then removed the color from #navbar ul li a:hover and added text-decoration: underline; (instead of none;)

Changing the theme within the admin panel

1. The blogroll (link) was in the right sidebar by default (in the original theme) so I removed the blogroll code in r_sidebar.php and placed it at the top of l_sidebar.php (before the category code).

2. Within design – widgets…I added the search box and a text box. I placed the html code for an ad inside the text box. (You can also place your google ads code here to display Google Ads).

Removed evidence of comments

1. I removed this comment code from index.php in the template files.


<h4>Comments</h4>
<?php comments_template(); // Get wp-comments.php template ?>

2. I removed this code in home.php to get rid of “leave a comment ” under each post on the home page.


<?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?>

Added a contact form

I downloaded the contact form plug-in from http://www.douglaskarr.com/projects/wp-contactform/ then uploaded it to the plug-ins folder and activated it. I then configured it within the admin panel to reflect the correct contact information.

Blog SEO optimization

1. I added the headspace plugin so the user can insert his own title and description tags for each post or page.

2. Under permalinks I added /%category%/%postname%/ to custom structure then created a .htaccess file to add the code the template produced and uploaded this to the server. This enables friendly URLs to be displayed for each post.

Conclusion.

The customization I did for this Word Press web site can be applied to all word press themes however I found this particular template and related templates clearly commented. This enabled me to easily find the appropriate code to edit.

Blogging or SBI ..Which is right for your business?

Ken Envoy has been (and still is) one of biggest fans for teaching me how to build profitable web sites and how to write high quality content. His formula of pre-selling your visitor before selling to them has stayed with me throughout the years because it works very well.

Recently he wrote an article saying that blogging is the wrong choice for building a business.

http://blogorbuild.sitesell.com/

Instead he advocates using SiteBuiltIt to build your business.

Why?

Because 35% of Site Build It! sites are in the Top 1% of all Web sites.

That’s pretty good proof.

As a web designer I don’t use SBI but have a main site and a blog. The purpose of my main site (static) is to offer my web design services and write long term content…articles. The blog takes more work however I enjoy writing so it’s actually a joy to do it.

Whatever you use depends on your purpose…it’s not really the tools you use but how you use them. The purpose of my blog is to freely and easily write quick posts, even articles that provide traffic to my main site and provide fresh content for visitors. The beauty of the blog is that I can spend only 15 min updating it with good content without knowing or using FTP.

I highly recommend his action guide for anyone thinking about starting a business online even if you don’t intend to use SBI.

His mantra is “don’t build a web site build a business

SBI gives you all the tools you need to research your niche, build a web site and market it to get lots of traffic. The forum is very active and helpful. The people there genuinely wish to help you build your online business.

If you’re reading this post and wish decide to go with SBI you’re lucky because he’s currently running a Mother’s Day Special where you can purchase SBI then get the second one for $100. You could give the second one to a friend or use it to build a second web site.

Check out the powerful SBI video to decide for yourself.

http://www.sitesell.com/webselling83.html

Why do you blog?

*****************************************
If you want to attract a continuous stream of NEW visitors to
your website without spending a dime on advertising pick up a copy of
my new ebook”Article Marketing Strategies“…
to receive immediate and long-term traffic.

Herman Drost is the Certified Internet Webmaster (CIW)
owner and author of Web Site Design, Web Hosting, SEO

WordPress Default Template – Display All Sidebars by Modifying Default Kubrick Theme

I recently installed the WordPress Default Kubrick Theme (1.6) and discovered it only displays the sidebar on the home page. This means visitors who land on any other page besides the home page will not see the links in the sidebar. They also can’t return to the home page (unless they click on the title in the header which most folks are not aware of).

Modifying the default (Kubrick 1.5) theme to provide a sidebar at all times:

After a little searching on the WordPress Forums I discovered a modified theme that suits my purpose.

Download this file:

http://guff.szub.net/wp-content/default_allsidebar.zip

To use, unzip to the directory/folder “default_allsidebar”, upload this to your wp-content/themes/ directory on your blog’s site, and select “WP Default – AllSidebar Edition” under Presentation in WordPress.

Display links and login info in your sidebar at all times:

Here is a modified version:

http://guff.szub.net/wp-content/kubrick_sidebar.zip

To use extract sidebar.php from the zip and replace your current one (either in default or default_allsidebar) with it.

Create a link to the Home Page from other pages

Login to the admin panel
Blogroll-Categories
Add category called MAIN PAGE
Click Add Category

Click Add Link
Add Name and URL of Home Page
Click box on far right named MAIN PAGE
Click Add Link

Example of WordPress Default Kubrick Theme Showing All Side Bars

By making these modifications to the WordPress Default Kubrick Theme you can now display the home page sidebar (with links) on other pages, plus create a link that takes the visitor back to the main page (home page).

*****************************************
Receive fresh, in-depth articles articles on how to design, optimize and promote your web site by subscribing to my “Marketing Tips” newsletter at: http://www.isitebuild.com/

Herman Drost is the Certified Internet Webmaster (CIW)
owner and author of Web Site Design, Web Hosting, Search Engine Optimization

WordPress Theme Generator – Create Your Own Customized Template

Finding a theme for WordPress is relatively easy because you can select one from thousands offered at the theme viewer

What if you can’t find one you like and wish to create your own customized template?

WordPress Theme Generator

The beauty of this online generator is that you don’t need to have any HTML knowledge to create a unique WordPress theme.

Here are some of the things it can do:

Change the colors for the background, foreground or individual sidebars.
Change the layout e.g., have one or 2 sidebars.
Change the body size to a fixed width or percentage
Place page tabs at the top or bottom.
Create different styles for your text.
Preview your customized template
Save your theme as a zip file.

If you can’t find a theme that matches your business, create a customized template with the WordPress Theme Generator

*****************************************
Receive fresh, in-depth articles articles on how to design, optimize and promote your web site by subscribing to my “Marketing Tips” newsletter at: http://www.isitebuild.com/

Herman Drost is the Certified Internet Webmaster (CIW)
owner and author of Web Site Design, Web Hosting, Search Engine Optimization

Customize Your WordPress or Blogger Template

Do you want your web site or blog to stand out from other templates?
Do you want to brand your business with a customized design?

[Read more…]