Archive

Archive for the ‘Webmaster’ Category

Deleting old Wordpress database entries from MySQL

September 26th, 2009

PREFACE: Back up your database before removing anything!!!

My Wordpress database was getting pretty big, despite not having all that many posts all things considered.

I figured the biggest issue was drafts wasting space, although it turned out to be “revisions” which make up over half the “post” size of my database. If you make a post and then tweak it 10 times because it doesn’t look right, you’ve just saved that post to your database 11 times. UGH! I’ll get into cleaning those up another day though.

Looking through PhpMyAdmin, the other area I found to be a bit large was the wp_options table. I started looking through all the listings and found a lot of entries that were obviously for plugins I didn’t use anymore. Some I deleted off-the-hop, but others I wasn’t so sure about. Note that a nice fast way of detecting and removing these “possible orphans” is using a Wordpress plugin I came across in my searching called Clean Options. It really helps narrow down what’s not being actively used.

In any case, looking up all these orphans took quite some time, but here’s a list of what I found out about some of them:

ai_ stuff
This appears to be leftovers from the All in One Adsense and YPN plugin
ai_120×240 — ai_120×600 — ai_125×125 — ai_160×600 — ai_180×150 — ai_200×200 — ai_234×60 — ai_250×250 — ai_300×250 — ai_336×280 — ai_468×60 — ai_728×90 — ai_adtype — ai_after — ai_archive — ai_before — ai_cat — ai_channel — ai_channel_ypn — ai_client — ai_client_ypn — ai_color_bg — ai_color_border — ai_color_link — ai_corner_style — ai_dfirst — ai_home — ai_lra — ai_nads — ai_nadspp — ai_network — ai_page — ai_post — ai_space
Yikes, quite a lot.  They hurt my eyes in notepad too. I was able to delete them successfully.

channel_id
chitika_id

These appear to be Read more…

Ideas for reducing load on your VPS

September 23rd, 2009

My last week’s been comprised of a lot of reading, a lot of brain-storming, and a lot of planning.

Here’s a scenerio:

  • Step 1: One of the sites on my VPS gets slashdotted, dugg, or picked up on by a major news site. It has actually happened a few times already although fortunately it’s been a side-story rather than a front-page news item (I say “fortunately” because I was on a shared host the times it happened. Being a side-story, it didn’t kill the server or get me canned).
  • Step 2: VPS starts to choke – either Apache swells up and starts swapping / dies when it hits the memory limit, or MySQL starts suffering from the same effect. In any case, the site doesn’t handle the traffic.

If the VPS isn’t responsive enough to log in, the possible rush-to-fix’s become: Read more…

Joomla, SJSB, SMF, and Google Canonical to reduce duplicate content – Part 2

March 1st, 2009

Check out Part 1 before going any further.

Tiny issue – after you do it, you may find that your wrapped version is full of “noindex” on all the pages. Well actually, it’ll have Joomla’s “index,follow”, but keep reading down the meta tags and you’ll find a “nofollow”. This is assuming you’ve told SJSB to pass the META tags to Joomla.

Anyway, you can fix it.

Edit your index.template.php file, and add the following: Read more…

Joomla, SJSB, and SMF – displaying different things on different sites

February 18th, 2009

I use a wrapper (SJSB) to show my SMF forums on my Joomla site.

Tiny issue is that the text shows up quite small on the Joomla site. It’s alright for me, but if anyone’s got poor eyes, a tiny screen, or a high resolution, it’d be brutal. I could have changed the CSS to simply make it bigger, but the smaller size actually suits the site.

To compromise, I decided I’d give a link to go to the “full” forums (which has a normal, larger size). Now, both sites share the same code, which means that link would normally show up on both. “click here to go to [exact same site] if the text is too small” would be a little silly.

Luckily, I came up with a simple php solution. It goes like this: Read more…

Joomla, SJSB, SMF, and Google Canonical to reduce duplicate content

February 17th, 2009

Here’s the issue. For the EGRR site, I have forums.eyeglassretailerreviews.com . I decided to install SJSB (Simple Joomla! 1.5.x / SMF 2.x Bridge) so that I could display the forums in-line (wrapped) on the www.eyeglassretailerreviews.com site as well. It works very well aside from the initial broken CSS, but I’ll give tips for formatting the CSS in another post.

In any case, one issue was.. duplicate content! Since all the pages were available at both “sites”, Googlebot would undoubtedly see them as separate sites with the same content – not good! There are 3 options:

  1. Leave it be, let google figure it out (not ideal)
  2. Use the noindex and nofollow meta tags on one of the sites
  3. Use the canonical meta tag to tell the bots which site is the preferred one

Option 1 was obviously not much of an option. Option 2 I really considered. The downside though is that if somebody LINKS to the site with the noindex, the potential pagerank will be killed. I decided to get Option 3 to work, since there are 0 downsides to it. Read more…

Getting indexed in Google in under 2 days

February 14th, 2009

A huge concern I had back when I first started my sites a few years ago was getting my sites indexed quickly. Really, I had spent hours making an excellent Eyeglass Review site, digging up piles of information and providing it to others. I went so far as to later buy glasses to review for the site. I spent yet more hours putting together a free warcraft map download site. One thing I hated about all the other sites was that it really didn’t give information about each map… The site owner had probably never even PLAYED most of the maps they provided. Mine was to be different. All the maps I provided had detailed info on how each custom map/game worked, how many players it supported, etc, with a tiny image of the loading screen. It didn’t take 10 clicks of ads to get to the download page either. I made it to be something I would love. It incidently now has more traffic than any of my other sites.

I believed in my sites. I put hours and hours making them into something that would provide for others what I wanted myself. I really wanted to get indexed quickly so people could start finding my site. Read more…

Using GoDaddy for cheap hosting of your files – A little experiment

February 12th, 2009

A couple of my sites provide a lot of files for download.

On my old webhost (asmallorange – a great shared host by the way), I originally started with a few small websites using their “Tiny” plan – a $25/year (just over $2/month!) plan that provided 75mb of space and 3GB of bandwidth per month. As needs grew, I kept increasing the plan, but it got to the point where I was upgrading just to get more and more bandwidth. I went from paying $25/year to $25/month, when really my sites would have survived in the end on a $10/month plan if I didn’t offer free downloads.

I eventually moved to a VPS for various reasons, but again, an issue became “what happens if I start using too much bandwidth”. I then thought of a solution! Use a host that oversells! Read more…

Trying to download files but they show as garbage characters – fixing your website.

February 11th, 2009

Just about everyone’s seen this issue at some point or another. It’s a pain when it happens on your own site though. You click a link, expecting a download to start, and low and behold you simply get a new webpages with a pile of garbled text.

Reason: For whatever reason, the MIME type of that file’s extension isn’t set on the server.

The Fix: The most simple way for most is to simply edit your .htaccess file. Add the following line:

AddType application/octet-stream zip

Replace zip with whatever the extension is. So if it’s.. warcraft maps for instance (mapname.w3x), use AddType application/octet-stream w3x. If it’s a .msu file, AddType application/octet-stream msu . And so on. What this will do is force the viewer’s browser to download whatever the file happens to be.

There are other ways to set the MIME type, but .htaccess is generally available to most people whether they’re on shared or dedicated hosting. In the event you’re using a webserver that supports .htaccess, ask your host how to change MIME types in your particular environment.

The easiest way to insert ads within content in Joomla 1.5

February 6th, 2009

Joomla has a pile of extensions that can be used to insert ads into Joomla content. I tried about 10, and they all had a lot of limiting things about them…

  • Often support only 1 type/style of ad
  • Many have “broken” things about them (won’t display colors properly etc)
  • In the case of adsense, many have very limiting options
  • Some force you to choose a position, and if you choose LEFT or RIGHT, it’ll wrap all your text around it – something you may not necessarily want.

I decided just to forget the adsense-oriented stuff and and find something that would let me just plug in my adsense code somewhere, and then insert my Adsense code easily into content whenever and whereever I wanted. It turns out an addon called “Jumi” was the way to go. Read more…

Migrating CPanel awstats from one host to another

February 1st, 2009

Something little I wanted to do – I moved from a shared host to a VPS. Rather than doing the typical account backup, I had transferred the files and databases individually.

The logs were easy enough to find in the original backup – they were in:

/home/ACCOUNT/tmp/awstats

The files are named something similar to awstats012007.somename.com.txt or in the case of an addon domain, awstats012007.anothername.somename.com.txt . This is important to note, because if you used a different account name on your new server, you’re going to have to RENAME these files – particularly the somename and if necessary, anothername parts. If you want to see what the new names are, browse over to your new site – as long as awstats has run (by default it only runs once every 24 hours), you should see the format of the new filenames. Read more…

Powered by CDN Rewrites