tidystorm

random techno-gab

I rescued my WordPress site with a WAMP test server

What led to this:

In February of 2012, I had two wordpress sites, built with the techozoic theme, which were broken for a variety of reasons, including a backlevel of techozoic and an importbuddy done without first deleting the files.

What I decided to do about it:

I thought that a good remedy would be to set up a WAMP environment for the purposes of debugging, and so that in the future, I would have a test server (also known as a staging server.)

Because I want to ultimately have two websites in WAMP, I will runa single install of Apache, MYSQL and PHP and then I will set up two different instances of my wordpress install.

How to later add the second website:

Whenever you want to add another website, it is as simple as creating another folder in your c:\wamp\www folder.

For more information:

See this website: http://sixrevisions.com/web-development/install-wordpress-on-your-computer-using-wampserver/

The specs:

(It’s important that the PHP versions be as close as possible to that of the live server, but especially the PHP version in WAMP should not be far behind that of the production server. The WordPress versions must match exactly. The Apache and Mysql should be as close as possible.)

  • WordPress 3.3.1 in both
  • PHP 5.2.17 in Production, PHP 5.3.9 in WAMP
  • Apache 2.2.21 in both
  • Mysql 5.1.56 in production, 5.5.20 in WAMP

Starting on Valentine’s Day, 2012, I set out on these steps to rebuild my mikemoran.com site in WAMP. These instructions developed and morphed over time. This post serves as documentation for myself of what I did. If it helps someone else, that’s great.

  1. Set up WAMP
    1. Note in advance that Secunia will probably flag elements of WAMPSERVER. It is not necessary to put the patches on unless you plan to use WAMP to support a live site.
    2. Download and install WAMPSERVER in the default directory C:\wamp
    3. Point your browser at localhost http://localhost to see the default server configuration page. 
    4. Create a directory for the mikemoran website files c:\wamp\www\mikemoran.com
    5. Go to localhost to see that mikemoran.com is listed under “projects.” Then go to http://localhost/mikemoran.com
  2. Install WordPress
    1. Download the latest WordPress zip file, and extract it into the mikemoran.com subdirectory of www. 
    2. Visit http://localhost, then under Aliases,click on phpmyadmin to create a database. Use the same name as that on the production server.
    3. Visit http://localhost/mikemoran.com/wordpress to start the WordPress install. 
    4. When it says you have no config file, then click on the button that says “Create a configuration file.” You will be able to match it to the server later.
    5. When you get to the database screen, set the database name, set the MySQL username to root, and don’t set a password. Leave the other defaults. Click “submit.”
    6. Click “Run the install.” Put in the site title and the same usernames and password as that on the production server.
    7. Click “install wordpress.”
    8. Go back to phpMyAdmin to check for the presence of your database tables
    9. Set PHP Config settings to be exactly what you have on the live production site (in php.ini). If you can’t see the contents of the php.ini file directly on the server, then you can run this php file:
      <?php phpinfo(); ?>
      Then navigate to that file in your web browser, and you will see the needed information. The instructions I found said that the most important thing is to make sure that safe_mode is set, and magic_quotes_gpc is set. I found them to be set to off on my live server, so I left them off in my WAMP installation. To compare it to the WAMP php, click on the WAMP icon, click on “localhost” and then click “phpinfo” which is under the Tools category.
    10. If you see from the php.ini file that you have a different PHP version on the live server than you do on WAMP, then change your wampserver PHP to match the one on the server, but at worst, it really ought to be at least PHP 5 on the server! 
    11. To get pretty URL’s, enable mod_rewrite: click on the WampServer icon in the taskbar, mouse over Apache and then Apache modules. Find rewrite_module in the list and click it. You will need to then click Restart all services to start using mod_rewrite.
    12. Create a MySQL user with the same details as our live server’s WordPress MySQL user. To do this, browse to http://localhost/phpmyadmin again and click on your WordPress database to select it (you only have one database so this should be easy).Next, click on the Privileges tab at the top of the screen, and then click Add a new User. Give the new user the same name and password as your live MySQL user. Use localhost.   Click the Check All option at the bottom, which grants my new MySQL user all privileges. Click “go.”
    13. Configure the wordpress install: We will edit the WordPress config file (wp-config.php) to match the new database details.Configuring the WordPress Install to Match the Live ServerNow we have a local website that has the same configuration as your live server.
  3. Move the wordpress installation to the root so there’s no longer a wordpress folde
  4. Configure the admin pages. In settings–>general, cange the URL’s to http://localhost/mikemoran.com. Scroll down all the settings in your wamp wordpress installation, and match them to the live server.
  5. Install the latest version of techozoic
  6. Install all the plugins
  7. Copy the style file from the “custom css” plugin into the techozoic custom css.
  8. Create a zip file database backup from our current production site
  9. Backup the existing WAMP database
  10. Use importbuddy to import the backed up mikemoran database
  11. If there are errors, then remove the database and restore the backed up WAMP database. Then research how to pull in only the pages and posts.

Go live with WordPress

I had an old site built with flat html files. Then I installed a new site in wordpress as a subfolder on the old site, with the intent of switching over and going “live” when I’m done.

During development, I decided to follow the prevailing instructions for “going live” without moving the files (not moving the files seems important to people) entailing changing settings–>general site address subdirectory to root, then moving the index.php to the root, then editing the index.php to change the wp-blog-header.php

But the procedure made a mess, and I had to quickly restore everything. I was in no mood to debug the process.

So instead I tried another method, which worked! Why, anyway, is it so awful to “move the wordpress files”? Moving the wordpress files to the root directory turned out to be simpler. I’d recommend it to anybody who doesn’t mind having their wordpress files in the root (it makes the root cluttered, but that’s the only drawback.)

Here’s the procedure:

  1. Make sure first that you have all the pages in, the navigation working, that none of the links contain “/wordpress/” in the URL.
  2. Move or delete all of the directories and files from the old site: Every .htm file, every .inc file, every .css file, .tmpl file.
  3. Move or delete all of the files in the public_html directory except wp-config.php and favicon files
  4. Change both urls in wordpress general settings to remove wordpress
  5. Move all of the files in the wordpress directory to the public_html directory
  6. Verify that you can see your site and your wordpress admin

WordPress CSS Management my way

I’m new to Content Management Systems and new to WordPress. I’m new to CSS, and I’m new to the Techozoic theme that I chose for WordPress.

New new new.

So I naively figured that somehow there’s a way to muck with CSS that would be one consistent place, and would be processed after all other style sheets. Wrong.

I tried to change the CSS of the WP Author Plug-in in the same place where I put in all my other CSS changes, which is in “Techozoic Settings.”

Didn’t work. But I don’t want to change the plugin CSS, because that will go away when the plug-in gets updated.

Being the newbie, I figured there must be a plug-in that lets me edit a CSS file that really does come last. And there was!

It’s called My Custom CSS.

I’m still new, and maybe I’ll always be, because I don’t get how other folks update their CSS.

I’m running WordPress 3.2.1

How to add a database to backupmachine

I use lunarpages as my host. I’ve had to derive over time how to add databases to Backup Machine.

Here are the steps:

  1. Click on “add MYSQL database”
  2. For the database server, fill in the host name or the IP, not localhost. Find the IP on Cpanel (or probably LPCP)
  3. Fill in the database name
  4. Fill in user name. (You first have to create a user name in PHPMYADMIN. I suggest creating a username specifically for backupmachine.com)
  5. The password is whatever you assigned to the user name you just created.

Notes:
If you run into an error, take note of the error message because backupmachine will tell you their IP address in the error message. Then go into Remote MYSQL on CPanel (or probably LPCP) and put backupmachine’s IP address in. Then try again.

In LPCP you can add the IP address on the same page and at the same time as creating the user.

If LPCP assigns your user with an “@” appendage, remove that part of the user name when you type into backupmachine.

If all else fails, add a wildcard to as the Access Host in Remote Database Access Hosts. The wild card is a lone percent sign.

[Solved] Quicken 2010 Annual Privacy Notice won’t go away

Once a year, Quicken issues a privacy notice in a pop up box. For most users, clicking on “close” will make it go away until next year.

But it might not. If it keeps coming back, it’s probably fixable this way:

  1. Look for a file called “quicken.ini” in one of these two places:

    C:\Documents and Settings\All Users\Application Data\Intuit\Quicken\Config\Quicken.ini 
    or
    C:\ProgramData\Intuit\Quicken\Config\Quicken.ini</li>

  2. Look for the line named “[GLB]“.
  3. Look at the next line, which is “Date=”. An old date is the problem. Correct this to be a date well in the future.

Why I buy Lenovo

No, I’m not a Lenovo employee, although years ago, hubby and I did work for IBM, from whom Lenovo eventually bought the PC division.

That’s how I came to be buying Lenovo’s — we had been buying from our company at an employee discount.

Now I wouldn’t switch. Two reasons:

1. The Lenovo Thinkvantage software that comes with the computer, or can be downloaded, is not bloatware. It’s really really useful.

2. The service is still great. Last week I burned out the motherboard. It was still under warranty, so I called, and the process was relatively painless. I mailed it to them, and they turned it around back to me in a week and a half, reporting that both the motherboard and one USB port had failed and were now replaced.

I’m back in business. And I still continue to buy Lenovo.

Staples Sells Me Three Blind Mice

I ordered three wireless Microsoft mice from Staples. The green one and the red one for my kids worked fine. The pink one, intended for yours truly, didn’t work. That was the first blind mouse.

Microsoft pink wireless mouse

A wireless mouse has two parts — the mouse body, and the usb receiver.

Now I’m the first one to say that a mouse of a pink hue isn’t exactly necessary for a computer, but a working mouse is. Nevertheless, I called the company and asked them to be sure the replacement is one of those pretty pink ones.

They apologized and told me not to send back the broken pink mouse; that they would simply ship me a new pink one. I tossed the busted mouse. And waited.

It arrived all right. And it was pink. So far so good. But the package had been pre-opened, and the receiver was missing. Second blind mouse.

I called them again, and they apologized a little more profusely this time. They promised a working pink mouse in a closed package.

The new mouse arrived in a closed package and it was green.

So I called again and they apologized even more profusely than the second time. They suggested I donate the green one to charity and they would send me my pink replacement right away.

I decided to open and test the green mouse before giving it away. It didn’t work. I called back to let them know that the green mouse wouldn’t be given to charity because it didn’t work.

Then my fourth mouse arrived. In a closed package. It was pink. And it works. And it’s actually a very nice mouse. It comes in many colors and can be purchased from Amazon.com.

As frustrating as the service was, I was never put on hold, and was never asked to send back the wayward mice.

I’d say Staples got part of this process right.

Out with Windows Defender

In my shop I have a Thinkpad with Ubuntu and Windows 7 in separate partitions. Why? Because Windows is that unreliable but occasionally that necessary. A few things just can’t be done in Ubuntu.

In the last month, Windows has crashed twice. The first time, the crash was unrecoverable. The second time, recovery to a restore point proved successful. I went back from 6/3/10 to 6/2/10. The 6/3/10 had a “critical update” for Windows Defender.

That got me thinking. Maybe Windows Defender is cranky. Sure enough, a google search reveals this could be so.

So I disabled Windows Defender. It was superfluous anyway, as I was already running Malwarebytes Anti-Malware and Spybot.

I followed these directions at Simple Help.

Today is June 5, 2010. If I don’t update this, just ping me and ask if it worked. I’ll let you know.