Home » Little Tips (Page 5)

Category Archives: Little Tips

Fundamental Website Setup Links



Little Tips: When Upgrade Issues Happen, Don’t Panic

As I expected, the WordPress forums are clogged up with issues related to the upgrade to version 2.3. Many of you were either caught unaware (though I did predict it and posted about it here), or you were blindsided by the fact that parts of your theme or plugins you thought were safe were using the older now unsupported database calls. If you have been affected by the upgrade effect–either you get a totally whitescreen with nothing showing, or parts of your site don’t appear–DON’T PANIC! There are some things you can do to at least get your site running until you can fix everything back to how you want it.

1) First thing, if possible go to your Admin Plugins interface and deactivate all of your plugins. If you can’t log in to your site, the last resort way of deactivating your plugins is to go to your servers file system (either FTP or through a web admin interface) and delete all of the plugins from the plugins folder in the wp-content folder. Of course make copies of them to your local system first.

2) Second thing, if your site still looks crazy or won’t load, go to the Admin interface Themes area and select either the “Classic” or “Default” theme that comes with WordPress. Unless your database is totally hosed this will at least allow your site to load. It probably won’t look like how you had it before, but at least you won’t be down. In an extreme case where you can’t load your admin area go to the wp-content folder and delete your theme folder (of course, like above, make a copy first to your local system if you don’t already have a copy). Then rename either the “Default” or “Classic” theme to have the same folder name as your non-operating theme. This should get you back to being able to log in and see your site.

3) If it appears your database is hosed and deactivating all of your plugins and using either the classic or default themes still won’t allow your site to load….well, you DID create a backup database didn’t you? It’s not a fun process but you will need to reload your old database. I can’t give you a quick rundown on that, but there are plenty of Google findable sites that have PhpMyAdmin tutorials or Cpanel or whatever you use for setting up databases on your server. Once you have that in place you can copy your older WordPress files (you DID back up your original files didn’t you?) back to the server and do research on how to upgrade in a way that will work for how your WordPress is set up.

4) Go to the WordPress.org website and post on their forum for help. There are many people there already, maybe they have already posted about your issue and received a response that might help you.

5) Go to the developers sites for your theme and plugins and see if there are updates available. If the software is still being maintained it will hopefully have an update soon, if it’s older and no longer maintained….you’ll have to find a replacement that fulfills it’s function. The good thing is anything that is normally a good idea for a plugin or theme will have someone making it or redoing it for compatibility with the newest versions of WordPress.

6) In worst case scenarios you can hire someone like me to fix things for you. If you have some cash there are plenty of people that are willing to work for you to fix things up. WordPress.org forums always have people posting to have someone help them for a fee, plus I’m available too :)

In general it really shouldn’t be hard to get a working site back up in an hour or so. Then the long process is figuring out how to upgrade without getting the same issues again. In some cases you may have to go find a new theme file and redo how you had your old one set up. It’s a bummer, but that’s how this stuff happens sometimes.

How To: Test Your Site on Your PC Part 2

I have discovered a powerful new way to set up a test server on a Windows PC. The best part of this new technique is it’s portable and should work on any PC you want. The new technique utilizes a thumbdrive and the software from a company called CH Software. They have developed a very awesome application called WOS Portable II which allows you to create a custom apache webserver configuration and install this to any thumbdrive. Once on the thumbdrive you simply plug it into any PC, start an application on the thumbdrive, and suddenly you have access to a MySQL database and full web server on any PC. The best part is the basic version is free and works great to do testing and development.

To get your own copy go to their download page, select new Download, and select the options you want on your install. I’d suggest php 5 (Not SE), mysql 5 (Not SE), Apache 2 (Not SE), and ImageMagick (this is an image manipulation package), and from the bottom list PhpMyAdmin (helps you add databases to MySQL). You can add some other open source Content Management programs also, but it’s best to try to install things yourself. Once you download the zip file you move the files to your thumbdrive and run the installer–that’s it!

The program creates a wosportable folder on the thumbdrive, and in there is the wos.exe file that you need to run to start the server. Also, place you website files in the folder www within the wosportable folder–then on your pc type “localhost/yoursitefolder” with the name of the folder in www you put your site files in and it will appear in your web browser. If you place the files in the root of the www folder then just type “localhost” to get there.

Now you can play around with anything you want without blowing something up live.

Little Tips 3: AJAX Can be More Haxxed

In the rush to add fun effects to our sites through javascript and other programming tricks, it’s important to know just how this affects the overall security of your site and server. Most people don’t realize that while javascript allows fun stuff like Windows style effects (lightbox on images, drag and drop stuff, areas opening and closing on your site without page reload, etc.)–that this same functionality also gives the user more power and ability to alter how your site works. Allowing the web browser to do programming level actions means that the end user, i.e. Hacker, now has more information about how your site works since variables and other programming information has to be exchanged between the web browser and the web server. In general javascript opens the most holes in security for any website, and the over reliance on it makes it almost impossible to be totally secure. Nasty things like Cross Site Scripting (XSS) attacks, and other methods to grab cookie or session authentication data all occur due to the loose way that javascript was designed.(this is usually how Hackers get your admin login or are able to log into your admin area)

So remember next time that you really want some flashy effects for you site–ask yourself, is this functional or just an effect? Remember, in 1997 flashing text was considered really cool, as was scrolling text….do they seem so cool now? The content is really what has value–flashy stuff may seem crappy later and only made it more likely that you see “I Haxored J00” at the top of your website.

For some more reading on this subject check out Arstechnica.

Little Tips 2

File naming. We all do it differently on our own computers. With Windows and OS X we have a large amount of leeway in how we can name our own files on our own computers. This is normally not an issue. It becomes an issue though when we want to use some of those files on a website. This is especially true of image or video files, though it can affect anything from documents to archive files as well.

As opposed to how personal computers work, most servers are fairly strict in how a file must be named in order to have it work correctly as part of a web page. The strict naming of files for linux servers only allows for letters, numbers, underscores (_), dashes (-) and periods (.) to be a part of the name of a file. You also must name the file as a continuous string of characters without spaces, so “my image.gif” isn’t valid but “my_image.gif” or “myimage.gif” or “my-image.gif” are valid.

This issue is particularly important for usage of WordPress with my AWSOM Pixgallery plugin, since incorrect naming of the image files can lead to issues displaying the images. The plugin supports custom names, so once you upload your images you can input a caption/custom name in the admin menu in any way you wish for display purposes, just make sure you leave the actual file name as something that is acceptable on the server.

Little Tips No.1

During the discussion on a Webcomic panel I was part of at Balticon this weekend I was reminded of an important tip that I always tell people who are starting out: Even if your website will be hosted at a community website or some other site that you don’t own, the best idea is to buy a URL and point it at where your site will be.

What this means is, if you are on Drunk Duck or Webcomics Nation, or even at a friend’s webserver–if you go out and buy a domain name called say “TheBestComicYouKnow.com” and then forward to the actual website location (which might be Comicgenesis.com/TheBestComicYouKnow), whenever anyone links to your comic have them use the URL you bought, not the actual location.

Why? Well, if you get very successful you’ll eventually want to move to your own server or location using your bought URL, and you DON’T want links that mentioned you going to that old location at Comicgenesis–essentially you would end up losing those links and Google pagerank and any press or writeups since you aren’t there anymore (and don’t expect the old places to forward to your new location) –so they would go to a dead end, and traffic numbers and things on the Internet need to find you to be important.

It costs practically nothing to buy a URL per year ($15 or less per year) and forwarding costs almost nothing. In the end you’ll be thankful you thought ahead.

AWSOM Powered