Moving WordPress and Yahoo Small Business Hosting

Posted by on May 10, 2012 in SEO, WordPress Development | 16 comments

Moving WordPress and Yahoo Small Business Hosting

Step one is don’t use Yahoo Small Business Hosting for WordPress. Sorry, I know it may be too late for that, but if you ever succeed in securing a means for time travel, print a copy of this to take back and leave somewhere your former self will find it. Just think: you wouldn’t have to sit through another one of my stinky posts; you’d be able to use your time machine for fun stuff. Also, make absolutely sure you don’t inform me that you’ve got time travel, because if I were to prevent my clients ever having selected YSB Web Hosting then I would never have had to write this article in the first place. The resulting cascade of paradox could rend asunder the very fabric of the universe.

Oh, and if you find yourself in Milwaukee on October 9th, 1998, come find me at Jeff’s house party and point out the foolishness of accepting drinks prepared by strangers.

“I don’t care what you think, I’m going to do it anyway!” -or- “It’s too late! Help!”

I hate to burst your bubble, but the fact that you’re here now means that you never do get your hands on a time machine. You’re contemplating the move and wanting to make all the necessary arrangements in advance in order to smooth your transition, or you went ahead and tried it and found that everything is broken. I shall now provide you with the list of things I would have done if only I’d known them and the things you can do now to get yourself un-broke.

A bunch of my files won’t upload via FTP!

Problem: Blah. Yahoo Small Business Web Hosting’s FTP servers won’t allow you to upload a file with a name which contains parentheses.

Cause: The reasoning is sound in that parentheses aren’t considered safe for URIs (RFC3986 reserves parentheses as being undesirable in URI strings because they have the potential to break evaluations by regular expression).

Solution: If you find yourself in a position where you’ve uploaded or created files in your /wp-content/uploads directory which are using parentheses in their names you’ve got a couple of options.

  1. The first and best option is to do away with these files before migrating your WordPress site. Replace them in your Media Library and update your posts and pages. Problem solved.
  2. What I’ve ended up having to do is archive all of the files with parentheses in their names in a zip file and upload that. Then, one can use the FileBrowser WordPress plugin to open the archive.

Permalinks don’t work!?

Problem: That’s right. You’ve moved WordPress and now none of your links are working. Going to the admin panel for Permalinks and clicking ‘Update Permalinks’, as recommended by Yahoo’s help article, does nothing for you. Everything looks right, but all of your links are returning a 404 error.

Cause: Yahoo Small Business Hosting doesn’t allow the use of .htaccess files. They’ve told me during a few phone conversations (I’ve hassled with them a number of times now) that it’s for security reasons. Apparently the thing to do is flatly forbid your customers doing something perfectly sensible and commonplace rather than engineer your systems in such a way as to prevent abuse. I digress…

Solution: I found one solution which involves making custom permalinks which look like ‘/index.php/%postname%/’, but this is unacceptable to me because a.) it’s ugly, and b.) it will trash your SEO unless you set up 301 permanent redirects to reference your new, nasty URLs. Here’s the cleaner workaround:

  1. Rename your blog directory via FTP. For instance, if your blog directory is ‘/bar’, rename it to ‘/bar.TEMP’. If your WordPress installation is at your document root, move the entire contents of your document root into a new directory called ‘/bar.TEMP’.
  2. Log in to your Yahoo Small Business Web Hosting control panel. Click the ‘Create & Update’ tab toward the top, then scroll down and click the ‘WordPress’ link under ‘Blog Tools’.
  3. Complete this form. Pay special attention to Step 2. Also, make sure that Step 3 accurately reflects what you want your endgame to look like (If your blog directory above was ‘/bar’ make sure to roll this WordPress installation out to ‘/bar’, if you’re going to be using the document root leave the directory field blank).
  4. Let their roll-out process happen.
  5. Again, via FTP, either rename the ‘/bar’ directory to ‘/bar.YSB_Blah’ or move everything in the document root except ‘/bar.TEMP’ into a new directory. Then reverse the procedure from Step 1, above. This will convince Yahoo’s hosting provision that it’s okay to give you the rewriting you need to handle permalinks.

Now I need 301 redirects! FML!!

Problem: You’ve moved domains or directories and you need to do 301 redirects to prevent losing all your hard-won SEO. Now, after everything else, you discover that Yahoo Small Business Web Hosting’s limitations forbid you doing site-wide permanent redirects. Well, they’ve thoughtfully provided a utility I didn’t even bother investigating which would theoretically allow someone to upload a CSV file containing all their 301s.

BAAa-HAHAHAha! Seriously!? Like I’m going to waste any more time than I already have tripping through YSB’s bizarre, unwieldy tool set.

Cause: It’s that .htaccess issue again. The common sense way to do this on an Apache server would be to catch and rewrite all inbound requests using .htaccess, but Yahoo Small Business Web Hosting… Well, you know.

Solution: Rename the index.php file in the location which would have been the base of your previous WordPress install. Create a new, blank index.php and insert this:

As always, you’ll want to make sure that the code you’re inserting is going to represent the reality of your situation.

In the arguments for the for loop at line 6, we need to initialize the loop at position 3 because we’re working with a request which would have originally included ‘/bar’. If your original URLs were for ‘www.olddomainfoo.com/bar’, you’ll want to leave it like this. If, on the other hand, your base URL was ‘www.olddomainfoo.com’, you’ll want to initialize $i at ’2′ instead of ’3′. Change line 6 to read:

Also, line 10 specifies the base for the URL you’re going to be redirecting to. You need to make this equal the URL of your new WordPress location. Make sure there’s no trailing slash.

15 comments
brettpolakowski
brettpolakowski

I know this has been up for a while but I'm trying to get redirection working for old links to force over to the main site and this page has been helpful. The old site was plain html and using the code below for 301's doesn't seem to be working to redirect to the main page. I did try using the Redirection plug in in WP as well, but that too wasn't working for me. Is there something you might recommend?

For example, I want www.domain.com/foo.html to redirect to www.domain.com, in which the path is www.domain.com/wp/ to the actual files.

Thanks much,

Brett

ejames77
ejames77

hmmm, 
im not trying to be offensive, but item number 2 (permalinks) is misleading...
if somebody has moved their wordpress/yahoosb installation into root, there is no way to make permalinks work, because yahoo forbids installation to the root.
(you cannot leave the installation directory blank, which would mean root)
yahoos cockamamie implementation of permalinks only allows wordpress to be installed into a subdirectory.
*please note* there is no way around subdirectory install on yahoosb!
also, yahoo forbids .htaccess...

sk450
sk450

Do NOT use yahoo to host your sites.  I just dropped $140 on them today for a one year package.  Complete waste of money.  I have four other hosting accounts (bluehost, hostgator, fatcow and godaddy) and they all work fine for my sites.  Yahoo is useless.  Don't even have cpanel access and you can't install wordpress on the root directory.  I will not be installing any sites and wish I could get  my money back...

Lkinoshita
Lkinoshita

Thanks for this. You captured our frustration perfectly. Yahoo Small Business has ruined our SEO with that index.php nonsense. I hope the redirection plugin helps in the future.

shenwchen
shenwchen

I've outgrown Yahoo small business and now moving my blog to a VPS, is there anything in particular I should watch out for to make sure migration goes smoothly?  I've been using Customizable Permalinks on Yahoo, will this still work in the new environment?

cparente
cparente

Jonah -- I'm getting stopped at step 2, WP won't allow me to do a second installation to the subdirectory, I get error message saying "already have installation at that directory." Sorry to bug you but please help. This is ridiculous hassle for Yahoo to put people through!

cparente
cparente

Hello. Yahoo support has sent me to this page! I've set up my WP files in a subdirectory, yet want visitors to land on the root directory. Was trying to follow the WP instructions here -- http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install - and failed due to htaccess issue. Having trouble following steps 3 and 5 in this post. Yahoo Support talked about deleting something, after I've renamed and done another install. Not clear what you mean by "reverse the procedure" in step 5. Can you please lay out the steps again? Thanks very much!

jeremywahlman
jeremywahlman

Regarding step #3 from the permalinks problem: there doesn't seem to be a way to choose the document root.  When I select "install in this new directory" and attempt to leave the directory field blank, the form tells me I have to enter a new directory name, which would take me off the root level.  When I attempt to choose an existing directory, there's no option for the root level.  Has this changed since you wrote the post, or am I missing something?  I'm trying to host a WP site on the root level through Yahoo Small Business.Thanks in advance!

Small Business Blog
Small Business Blog

I'm not very much familiar with source codes, let alone edit them. Is there a way for setting up 301 redirects through my web host's control panel?

jonahs
jonahs moderator

@ejames77 thanks for this, and no offense taken! I would rather be wrong than be misleading.

This behavior has apparently changed since I originally wrote this piece.

sk450
sk450

Well, it turns out getting my money back was really easy.  I just went online and cancelled my web hosting plan.  Zero questions asked with an immediate refund which made me happy.  You just need to make sure you do it within 30 days,

jonahs
jonahs moderator

 @shenwchen If you're migrating to a managed VPS, just make certain that your new hosting provider has installed Apache, MySQL, and PHP5! WordPress is not terribly picky where it operates. The Custom Permalinks plugin is only needed with Yahoo Small Business web hosting, as their infrastructure will not support permalinks the way they are intended by WordPress. You should have no need of that plugin on a VPS!

 

Please take the time to read my post on How to Move a WordPress Site to familiarize yourself with the process before beginning:

 

http://www.craniumstorm.com/how-to-move-a-wordpress-site/

 

Also, don't hesitate to get in touch with me if there's anything you feel you don't understand, or if you get stuck at any point.

jonahs
jonahs moderator

 @cparente What we're doing is tricking YSB's hosting.

 

The first step is to rename your existing WordPress installation location or move it out of the way so that it doesn't get overwritten.

 

Next, we're letting YSB's control panel app roll out a fresh WordPress install to that location.

 

Finally, we pull a switch on them, replacing the install they just rolled out for us with our original files.

 

Use the contact form to reach me if you're still having problems. Best of luck!