How to install MyBB Google SEO for MyBB for better SEO.
Updated January 22, 2013
A while ago I made a tutorial on how to install the MyBB Google SEO plugin here, at that time it was using Google SEO 1.1.13 [LEGACY] and MyBB 1.6.4. Both are outdated, this tutorial will be using the latest versions of both at the time of this post, being MyBB 1.6.9 and the Google SEO 1.6.5 plugin with the PluginLibrary 11 plugin (needed for MyBB Google SEO).
The MyBB Google SEO plugin is a powerful MyBB SEO plugin capable of making your MyBB powered forum to be more SEO friendly. with it you can add meta tag information to threads, create a sitemap for Googlebot to better crawl your forum, change the URL schemes for SEO friendly urls, and more.
Below is the install guide tutorial for MyBB Google SEO, which is using:
- MyBB 1.6.9
- Google SEO 1.6.5
- PluginLibrary 11
How to install MyBB Google SEO plugin
2. Extract the zip file.
3. Inside the extracted Google SEO folder, you should see several other files. Archive zip the “inc” folder to make a inc.zip file.
4. Login to cPanel, click File Manager, go to the root of your MyBB installation and make sure you check the Show Hidden Files (dotfiles) box.
5. Once you’re in the root domain name of your MyBB installation in File Manager, upload the inc.zip file you zipped earlier. Extract it after it finishes uploading, delete the inc.zip file now. The MyBB Google SEO plugin has now been extracted into the correct locations of MyBB (do NOT activate the plugin in your MyBB forum yet).
7. Extract the zip file, inside the inc/plugins folder, find pluginlibrary.php and upload this in /inc/plugins of your MyBB installation in File Manager.
8. Time to upload and modify the htaccess file for the MyBB Google SEO plugin. Recently it appears the plugin has been updated where the old htaccess file included does not work without some changes. I updated it to make it easier to edit, you can download the updated htaccess file here (if this doesn’t work, then try the old htaccess file included in the Google SEO folder). Upload htaccess.example.txt to the root of your MyBB installation in File Manager.
9. Download the current htaccess.txt file in your MyBB installation (to save as a backup in case you want to revert back) and then delete it.
10. In File Manager select the Code Editor for the htaccess.example.txt file and edit it, as we will need to make some changes to it for MyBB Google SEO.
11. This is the part of the htaccess file you need to edit:
The screenshot above outlines the parts of the htaccess.example.txt file you can edit. The ones in red NEEDS to be edited, while the ones in purple are optional. For the ones in red that circles “/MyBB/”, you must change these to your MyBB’s root installation URL. For example, if it’s at www.mywebsite.com, then change “/MyBB/” to just “/”. If it’s at www.mywebsite.com/myforum/, then change “/MyBB/” to “/myforum/”. For the red circle “yoursite/MyBB/” is similar as before. Replace it with “www.mywebsite.com/” or “www.mywebsite.com/myforum/”, wherever your root MyBB installation is. I’ll explain the purple circled areas later, but for now leave them as is. When the changes are complete, save them.
12. Rename htaccess.example.txt to .htaccess.
13. Time to activate the MyBB Google SEO plugin. Go into Admin CP of your MyBB forum, install and activate the Google SEO plugin (PluginLibrary does not need to be activated).
14. It should say “404, Meta, Redirect, Sitemap and URL are disabled. (Configure)”, click the configure link.
15. Switch Google SEO 404, Google SEO Meta, Google SEO Redirect, Google SEO Sitemap and Enable Google SEO URLs to yes. Save settings.
16. Go back to the plugins page, it should now say “404, Meta, Redirect, Sitemap and URL are enabled.”. Finally, time to make changes to the functions.php file, which is very easy. On the Google SEO plugin line that says “Click to Apply changes to core files.”, click the Apply link.
17. A green message should appear that says “Changes to inc/functions.php applied successfully”. That’s all, MyBB Google SEO has been installed completely.
To make further changes to the htaccess file, see the previous MyBB Google SEO tutorial here under “MyBB Google SEO optional features”.
Plugin author credit goes to frostschutz, official plugin support here: http://community.mybb.com/thread-101262.html
MyBB Google SEO 404 htaccess help
Getting 404 errors?
There can be many reasons for this, but it mostly has to do with your htaccess file. You likely didn’t edit it correctly. A few things to check are:
1. Make sure your htaccess file is renamed to .htaccess
2. In your Admin CP’s plugins page Google SEO may show you what needs to be changed in your htacess file, simply copy it, then edit your .htaccess file and find:
RewriteEngine on # Some hosts need a RewriteBase specification. RewriteBase /MyBB/ # Google SEO workaround for search.php highlights: # Make this rule the first rewrite rule in your .htaccess! RewriteRule ^([^&]*)&(.*)$ http://yoursite/MyBB/$1?$2 [L,QSA,R=301] # Google SEO Sitemap: RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC] # Google SEO URL Forums: RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC] # Google SEO URL Threads: RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC] # Google SEO URL Announcements: RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC] # Google SEO URL Users: RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC] # Google SEO URL Calendars: RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC] # Google SEO URL Events: RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC] # Google SEO 404: ErrorDocument 404 /MyBB/misc.php?google_seo_error=404
Replace all or the parts needed with the htaccess info from MyBB Google SEO.
3. Make sure you applied the changes to the core files.
4. Make sure the character encoding of the htaccess file is set to uft-8.