How to add Google AdSense on your WordPress page

I read that users of wordpress.com cannot add their own ads.  WordPress.com has their own ads.  I am not sure.  If that is the case, this post may not be useful.  But if you have your own hosting site, then your in business.  This is pretty simple.

First, get a Google Adsense account.  If you already have an account go to the next paragraph.  If you don’t, go to Google AdSense and apply.  After you submit your application, Google is going to review your application.  As part of the application process, you’ll need to add code to your web site.   Pick an ad size of 120×240 so that it can fit in your page.  At first, the code will display nothing, but you need to keep the code on your web site during the duration of the application process.  Once the review is complete, you’re going to see ads.

Once you have code, go to Appearance->Widgets.  Look for the text widget in the Available Widgets section.  Now the next step is going to depend on your theme.  On my theme, drag to the text widget to the Secondary Widget Area.  This will add a text widget to the Secondary Widget Area which represents the right side bar of the web page.  Click on the Text widget that you just dragged to the Secondary Widget Area.  The widget should expand to a title text box and an another text box, a bigger box, in the bottom.

Leave the title box blank.  In the bottom box, add your code.    Click on Save.

And that’s it.

Once you have one ad going, you can put two more ads for a maximum three per page.  Or, one 300×600 ad unit.  Basically, one 300×600 unit or three other ad units.  You shouldn’t add one 300×600 ad unit and one more ad unit.  The rule is here.  http://support.google.com/adsense/answer/1346295?hl=en-GB#Google_ad_limit_per_page .

 

How to set up a WordPress site on GoDaddy

This article assumes that your have a domain registered with GoDaddy and a hosting plan purchased from GoDaddy.

Associate your hosting package to your domain.  From the accounts page, expand Web Hosting and I think you click on Launch next to New Accounts.  You be prompted to choose your domain that the hosting will associate with.  Your FTP username will be given.  You’ll be prompted for a password.  Choose a strong password.  Jot down your username and password.  Press either OK, enter, or continue (I can’t remember which it is.)

Wait a while for the setup to complete.

Once setup is complete, go to your Hosting Details page.  From your accounts page, expand on Web Hosting and select your domain that has the new hosting.  In the Hosting Details page, select Install WordPress.  Select your username, password, and email address.  This is going to be your administrative username when you log in to your WordPress site.  This not your FTP username.  Do not use ‘admin’ as your username.  Hackers try to log in using admin.

Wait awhile for the install to complete.  Once the install is complete, click on Applications.  In the Manage Applications page, press Log In.  Enter your WordPress username and password.  You should enter in the back-end of your WordPress page.

First, install Wordfence Security plugin.  On the left side of the page, go to Plugins->Add New.  In the search box, enter Wordfence and press Search Plugin.  Go to Wordfence Security and press Install Now and press OK.  Then select Activate Plugin.  This plugin is like a firewall plugin.  It adds a layer of security to keep hackers at bay.

You might hear stories about WordPress pages being hacked.  Hackers are out there.  They might find your WordPress page before a search engine does.  So it is a good idea to keep them out.  One time I finished this WordPress web site on a Saturday night.  The hackers were doing there thing on Sunday morning trying to register accounts on my site.  On Monday I think a hacker tried to login as admin 20 times.  Wordfence locked the user out.

Back to Wordfence, go to Wordfence->Options and go down to the Alerts section.  Check everything in the section.  Go down to the Scans to include section and check Scan theme files against repository versions for changes and check  Scan plugin files against repository versions for changes.  Go up to enter your email address of alerts.  Scroll to the bottom and select Save Changes.

Go to Settings->General and uncheck Anyone can register.  While your here, set your time zone and Week Starts On.  Click on Save Changes.

Go to Settings->Permalinks.  Select anything except for default.  WordPress SEO plugin recommends post name.  Better WP Security needs the permalink setting to be other than default.  I use post name.  Select Save Changes.

Install Better WP Security plugin.  Do the same thing as you did with Wordfence except install Better WP Security.  Click on Security on the left side panel.  Click on Create Database.  This backs up your database and emails it to you.  Then select Secure My Site From Basic Attacks.  You’ll be taken to another page.  Address issues that are in red.  For me, number 5 and 6 are in red.  For number 5, click on Click here to change user 1’s ID.  Click on Change User 1 ID.  Go back to Security->Dashboard.  For number 6, click on Click here to rename it.  Click on Change Database Table Prefix.  After you select the button, jot down the table prefix in case you need to restore your database.  Note that the database that was emailed to you has a table prefix of ‘wp_’.  The prefix that you jotted down is the new prefix for your database from here on.  The table prefix is important if you need to restore a database.  Go back to Security->Dashboard.  You can address the yellow warnings.  For me, it is numbers 1, 8, and 9.  For number 1, select Subscriber and select Save Changes.  For number 8, select a range of time that you’ll not be logging in your web site.  For number 9, check Enable Default Banned List and select Add Host and Agent Blacklist.

Now,  remove the Site Admin link.  Go to Appearance->Widgets.  On the Main Sidebar, move the Meta box to the middle side of the screen.  This should get rid of the Site Admin link.

Activate the Askimet plugin.  This plugin should already be installed with WordPress.  This keeps spam away from your comments.  You just need to activate it.  Click on Create New Askimet Key.  Follow the instructions.  Note that the plugin is free.  It’s just when you register for the plugin, Askimet will prompt you for credit card information.  If you don’t want to pay a donation for the plugin, move the slider to the left to zero.  This will make the credit card fields disappear.  Otherwise, you going to pay $36 every year.

It is a good idea to backup your database every so often.  You can schedule a database backup.  Go to Security->Database Backup.  Check on Enabled Scheduled Backups and select Save Changes.  By doing this, you should receive a zip file containing your database in your email account.  The file size of the zip file is probably going to be around 250KB.

That’s about it in setting up WordPress account.  Now you need to create posts and pages.  Check out the following link to know the difference between posts and pages: http://www.wpbeginner.com/beginners-guide/what-is-the-difference-between-posts-vs-pages-in-wordpress/.  This article is a post.  The About page is a page.

The WordPress install comes with the Jetpack plugin which is a collection of tools provided by WordPress.com.  I am currently learning to how to use it.  It is a lot of tools.  They are not important to set up your WordPress page.  They are nice to have.

I hope this was helpful.  I am thinking about creating another post on tips on maintaining a WordPress site after it is created.   Stay tuned.

How to restore your WordPress site

The following information is applicable for web hosts on GoDaddy.  Note that GoDaddy has a history feature for the file system.  GoDaddy I think backs up your web site files on a daily basis up to 30 days.  So if you need to restore your files to a previous state, go to the Hosting Details page and click on FTP Manager.  In the FTP File Manager page, click on History.  Click on the calendar icon and pick a previous day.  You should see a snapshot of the file system for that particular day.

If for some reason you need to blow away your WordPress web site and start fresh, all you need is your database.  If you can restore your wp-config.php file that would be better.

You going to need an FTP client.  I use FileZilla.  It’s free.  FileZilla comes with a client and a server.  Install the client, not the server.  Installing the server might open a security risk on your computer.  Connect to your website via FTP.  If you can, connect using a secure connection because regular FTP is unencrypted.  Because of this, you shouldn’t use regular FTP in public wifi’s such as a coffee shop.  I use use FTP with TLS/SSL.  If you don’t know your FTP username and password, contact your hosting provider.

There are two files you should to backup, your database and wp-config.php.  If you can’t back up your wp-config.php, that’s OK.  You can probably go without it.  If you can back up the file, download it to your computer using your FTP client.  The database is a bit tricky.  On GoDaddy, from your account page, go to Web Hosting and expand it.  Select your web site.  In the Hosting Details page, select Databases on the upper right side of the page.  In the Manage Databases page, click on the Actions button associated with your database and then select Back Up.  This will create a backup database, an .sql file, in the _db_backups directory in your web site.  Using your FTP client, download the _db_backups directory to your computer.

Now uninstall WordPress.  On GoDaddy, there should be a button that uninstalls WordPress.  Select it.  After uninstallation is complete, delete all the remaining files on your web site using your FTP client.  Now install WordPress.  Provide a username, password, and email address.  Note this information is going to be useless once you restore your database.

Now backup the current database.  This database was created from the re-installation.  Follow the previous instructions in backing up your current database.  By backing up the current database, the  _db_backups directory gets recreated.  Now, upload your backed up database, not the current database, to the _db_backups directory.  On GoDaddy, in the Manage Databases page, select the Action button and then select Restore.  You should see a list of databases to restore.  Select the backed up database.

That should be it.  Browse your web site and see if it works.  If you get a database connect error or get a welcome page as if you just started from brand new and don’t see your original posts, you might have a table prefix problem.  If you changed your table prefix before backing up your database, you need to modify wp-config.php to set your table prefix.  Check your backed up wp-config.php, look up $table_prefix, and see if it is set to anything other than ‘wp_’.  If it is not ‘wp_’, change $table_prefix on in wp-config.php on your web site to the $table_prefix on your backed up copy.  Don’t replace the wp-config.php on the web site with the backed up copy because the web site copy has database information specific to the current install of WordPress.  If you replace the file, the WordPress installation might lose connection to your database.  After you modified wp-config.php on your web site, save  it.  Reload your web site on your browser and you should be in business.

If you don’t know your table prefix, you can do one of two things.  One is to restore wp-config.php from the FTP History feature and look up the table prefix in there.  The other is to look up the table prefix in the database.

If you want to open a database, on GoDaddy, in the Manage Databases page, select phpMyAdmin.  You’ll be prompted for a username and password.  To get your username and password, open the wp-config.php on your web site and look up DB_USER and DB_PASSWORD.  Once you’re logged in, click on Databases.  Click on your database.  Look under the table column.  You should see a list of tables with the same prefix.  That’s your prefix.

Change the table prefix in wp-config.php and save the file.  Make sure your file permission for wp-config.php is 600.  On FileZilla, right click on wp-config.php on the web site and you should see the numeric value for the file.  Reload your website on your browser and you should be in business.

Note that your username and passwords from your restored database will be restored.  You going to need to log in again to your web site using your restored username and password.  You going to need to reinstall your plugins.  Most of your plugin settings will be restored.  For instance, if you got an API key for a plugin, once your reinstall the plugin, the plugin should see the API key from your restored database.  You should not need to get another API key.

 

How to setup a WordPress blog on your web host

It was quite simple.  It took me a few hours.  I still need to do some tweeking though and to figure things out.  While I am setting up this blog, I might as well mention how I did it.  You don’t need to know HTML.

When you install WordPress to your host, make sure you use a strong password.  Pick a user name besides admin and besides your domain name; something not obvious.  The idea is to conceal your username from hackers.

I followed the instructions in this website http://websitesetupguide.com/basic/start.htm#head.  I didn’t use FatCow; I used GoDaddy.  I had free hosting credits on GoDaddy, so I used them.

The instructions suggests to use the askimet plugin.  The instructions says its free.  It is free.  It’s just when you register for the plugin, askimet will prompt you for credit card information.  If you don’t want to pay a donation for the plugin, move the slider to the left to zero.  This will make the credit card fields disappear.  Otherwise, you going to pay I think $36 every year.

You might get some registered users with strange usernames and email addresses.  I received email notifications of these registered users.  I built the blog on a Saturday night and I received the registered users the morning after.  To disable registration (you don’t need to register to leave a comment), go to Settings->General and in the Membership field uncheck Anyone can register.  If you have registered users, don’t forget to delete them.  I am not sure of the motive behind the registered users.  Maybe they are trying to hack the  blog hoping to get administrative access to the blog.

If you want remove the link to user registration, go to Appearance->Widgets.  In the Main Widget Area on the right side of the screen, drag the Meta box to left side the screen.  This should remove the Meta column, which contains the registration link, from the bottom of your blog.

If you want to know the difference between pages and posts, check out this link http://www.wpbeginner.com/beginners-guide/what-is-the-difference-between-posts-vs-pages-in-wordpress/.

If you want your blog to be searchable in the search engines, install the Google XML Sitemaps plugin.  This will create a sitemap and submit it to Bing and Google.  I think when you submit to Bing, the submission also goes to Yahoo.
An alternative is the WordPress SEO plugin.  Off the bat, it recommended me to switch the permalink setting to post name.  This plugin seems more geared for SEO than the Google XML Sitemaps.  The SEO plugin is more advanced while the Google XML is more simpler.  If you do install this plugin, go to SEO->XML Sitemaps and check Disable author/user sitemap.  This prevent hackers from guessing your username.

If you want to use Google Analytics for your blog, install the Google Analytics for WordPress plugin.  Make sure you install Google Analytics for WordPress, not Google Analytics.  Google Analytics is a different plugin.  If you already have a tracking ID, Google Analytics for WordPress gives you an option to enter the tracking ID.

If you don’t have comments enabled for your posts and you want to enable them for a particular post, go to Posts->All Posts and hover over your post that you want to enable.  You should see Quick Edit underneath the post.  Click on it and check Allow Comments.  Then press the Update button.

If you want to delete a category, go to Dashboard.  In the Dashboard page, go to the Right Now window and click on word Categories.  Hover over the category that you want to delete, click on delete.  Note you cannot delete Uncategorized.

To install Captcha (to keep bots from entering forms), go to Plugins->Add New and enter Captcha in the search box.  Click on Search Plugins.  You should see Captcha in the search list.  Install it.

Backup your blog.  You going to need an FTP client.  I use FileZilla.  It’s free.  FileZilla comes with a client and a server.  Install the client, not the server.  Installing the server might open a security risk on your computer.  Connect to your website via FTP.  If you can, connect using a secure connection because regular FTP is unencrypted.  Because of this, you shouldn’t use regular FTP in public wifi’s such as a coffee shop.  I use use FTP with TLS/SSL.  If you don’t know your FTP username and password, contact your hosting provider.

There is really two things you need to backup.  You need to backup wp-config.php and your database.   Downloading wp-config.php is simple; just download it to your computer using your FTP client.  The database is a bit tricky.  On GoDaddy, from your account page, go to Web Hosting and expand it.  Select your web site.  In the Hosting Details page, select Databases on the upper right side of the page.  Click on the Actions button associated with your database and then select Back Up.  This will create a backup database in the _db_backups directory in your web site.  Using your FTP client, download the _db_backups directory to your computer.  That’s it.

For security, install Better WP Security plugin.  If the plugin warns you to enable your permalinks, change your permalinks to anything other than default.  If you installed WordPress SEO, the SEO plugin would have suggested you to switch to the post name permalink setting.  To change the permalink setting, go to Settings->Permalink.  Follow the instructions by clicking on Security on the left side panel.  One of the things this plugin can do is change your table prefix after installation.  Changing the prefix is a security measure to make the blog more secure.

Another plugin to install for security is Wordfence Security.  Watch the video and follow the guides.  The morning after I installed the plugin, I got an email warning me that somebody tried to log in using the admin username.  After 20 attempts, Wordfence locked the user out.  Pretty neat plugin.

Even though you submit sitemaps to search engines in order to promote your blog, it is sort of ironic that the first people who might notice your blog are hackers.

One advantage of hosting your WordPress page is that you can run ads on it.  I don’t think you can do that on wordpress.com.  If you have an account to run ads, such as Google adSense, get an ad unit from your account and copy the HTML code.  Then go to this link to see how it is done:  http://www.siteground.com/tutorials/wordpress/wordpress_adsense.htm.