Upgrading 1.2 to 1.5
READ this stuff please.
A lot of work has gone into making the upgrade process as smooth as possible for you, and it does work. Yes it does. Really. Just do EXACTLY what is listed here and all will be good. Please don't think you can skip bits, or that you know better - you'll just end up frustrated and posting to the forums.
Read this first and if you are unsure, and post any questions to the forums. It is easier to get things right than fix a mistake you have made because of an uncertainty.
Tools for the job
You will need:
- Time. Do not do this when you are tired or in a rush.
- FTP client.
- Text editor. Do NOT use a Word Processor for anything here. WordPad (PC) BBEdit (Mac) are fine. Do NOT use Dreamweaver or Adobe GoLive either.
Warning
BACKUP YOUR DATA.
Your blog. Your data. Your loss if it all goes. Make a backup of the database AND a backup of all the WordPress files before you start the process below. I accept no responsibility for any loss of data.
- Create a folder called "Full Backup" on your computer.
- Download ALL your WordPress files into this folder.
- Backup your database. Instructions to do this are here.
Prepare your files
On your desktop, create a new folder called "WP files". Into this, download the following files from your 1.2 template (yes, I know you've downloaded them once, but you need to do this okay ?)
- index.php
- wp-comments.php
- wp-comments-popup.php
- wp-config.php
- wp-layout.css
- IF you use Kubrick, also download kubrick-searchform.php
Also download any other files which you have changed a lot - an example would be vars.php if you have changed smilies.
Your backup is just that - a backup - and these files will become altered which is why the double download.
Now we need to download a few more files. On your desktop, create a new folders called "My Plugs". Into this, download all your plugins and all other folders that may be inside your plugins directory on your site.
Adjust your files #1
The following changes are needed so that your current layout is carried through into the upgraded blog. Do all of this using the files you downloaded seperately:
- Open your index.php in your text editor.
- Comment out the wp-blog-header require line at the top of index.php. Do this by putting // at the start of each line.
<?php
//* Don't remove this line. */
//require('./wp-blog-header.php');
?>
- Update the stylesheet import line in index.php. Replace this:
@import url( <?php echo get_settings('siteurl'); ?>/wp-layout.css );
with this:
@import url( <?php bloginfo('stylesheet_url'); ?> );
- IF you use Kubrick, you will have a line like this:
<link rel="stylesheet" href="<?php echo
get_settings('siteurl'); ?>/wp-layout.css" type="text/css"
media="screen" />
you must change that to this (for Kubrick layouts only remember):
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"
type="text/css" media="screen" />
- Update the wp-comments include line in index.php. Replace this:
<?php include(ABSPATH . 'wp-comments.php'); ?>
with this:
<?php comments_template(); ?>
- Now save index.php
- Rename wp-comments.php to comments.php
- Open wp-comments-popup.php. Find this line at the top : require ('wp-blog-header.php');
You must comment out that line:
// require ('wp-blog-header.php');
The top of your wp-comments-popup.php must look like this:
<?php
/* Don't remove these lines. */
$blog = 1;
//require ('wp-blog-header.php');
add_filter('comment_text', 'popuplinks');
Save the file.
- Rename wp-comments-popup.php as comments-popup.php
- Add a theme header to wp-layout.css. Something like this (you can just copy and paste this for now):
/*
Theme Name: My Original layout
Theme URI: http://myblog.com/
Description: Your theme
Version: 1
Author: You
Author URI: http://myblog.com/
*/
- Now rename wp-layout.css to style.css.
- You should now have 6 files:
- index.php
- comments.php
- comments-popup.php
- style.css
- wp-config.php
- IF you use Kubrick, you will have 6 files - kubrick-searchform.php
- Now create a folder called "Carrots" and put the first 4 files there into that folder (and searchform.php if you use Kubrick).
WordPress 1.5
This should be downloaded from http://wordpress.org/download
Unzip this on your computer.
It should unzip into 4 folders and several files.
If it all unzips into one big folder full of files, delete them and unzip the download again. Check whichever program you use to unzip and make sure it respects folder structure.
Now what is needed is for you to move those files you were just editing into this new download.
- Open the wordpress download
- Open the folder called "wp-content"
- See a folder called "themes" ? Open it
- You have a folder called "Carrots". Copy that folder into "themes". (In that folder you should now be seeing 3 folders - Default, Classic and Carrots)
- Close themes, close wp-content. You should see the 4 folders (wp-content, wp-images, wp-admin, wp-includes) and a list of files. Copy your wp-config.php here.
Your 1.5 upload is about ready to go
- Open the wordpress download
- Open the folder called "wp-content"
- See a folder called "plugins" ? Open it and delete what is in it.
- You have a folder called "My Plugs". Copy everything from that folder into the plugins folder.
- Close the folders.
The folder wp-images has not changed since 1.2mingus. You do not have to upload this if you are upgrading, and can delete this folder from the 1.5 download if you want.
The actual upgrade #1
- Login to your admin panel and DEACTIVATE every plugin. (This is VERY important !)
- Leave your /wp-images directory alone.
- DELETE the /wp-admin directory.
- DELETE the /wp-includes directory.
- DELETE the /wp-content directory.
Now delete all these WP files. All of them. If you have 1.2, 1.2.1 or 1.2.2 then here is a list of what needs deleting:
- index.php
- print.css
- wp-atom.php
- wp-blog-header.php
- wp-comments-popup.php
- wp-comments-post.php
- wp-comments-reply.php
- wp-comments.php
- wp-commentsrss2.php
- wp-feed.php
- wp-layout.css
- wp-links-opml.php
- wp-locations.php
- wp-login.php
- wp-mail.php
- wp-pass.php
- wp-rdf.php
- wp-register.php
- wp-rss.php
- wp-rss2.php
- wp-settings.php
- wp-trackback.php
- wp.php
- xmlrpc.php
If you just overwrite files, you WILL get errors. Probably a whole lot of them. DELETE instead
The actual upgrade #2
- Upload the /wp-admin directory.
- Upload the /wp-includes directory.
- Upload the /wp-content directory.
- Leave your /wp-images directory alone.
- Upload all other files that came with the 1.5 download
Check that none of the uploaded files have a size of 0 (zero). If they do, re-upload that file.
Upgrade !
Using your browser, visit the upgrade script that you just uploaded to your site. It will usually be located somewhere like this:
www.example.com/wp-admin/upgrade.php
or
www.example.com/wordpress/wp-admin/upgrade.php (where 'wordpress' is the name of your blog directory).
THIS IS REALLY REALLY IMPORTANT !
OOoohh New Site !
Scroll down for a mini-FAQ
You will need to reactivate your plugins
Use your ftp client to CHMOD any directories
Use your ftp client to CHMOD your .htaccess file to 664 and regenerate your rewrite rules by going to Options > permalinks (Thanks to Au Yong)
Your site will have switched to the new default style.
Click the "Presentation" tab at the top of the screen.
Now "Select" the theme called My original layout
Have a look at your blog.
Notice anything missing ? Images maybe ? You may have to edit style.css to get the image paths correct - you can do this through the Theme editor (it's just under the main set of headings on the same page as the Themes list).
Tidying
You may have downloaded other files that you have changed a lot. If you just upload those and overwrite the new 1.5 code, you will get errors. If you want whatever changes you made, you will have to compare the new files and the old files and carefully make your changes.
Credits
Specifically for this guide, the following people should be thanked:
Ryan Boren - not only for writing lots of code in the first place, but for providing the skeleton guide from which this page has arisen.
And everyone here has helped by volunteering their time (in response to a post on my blog) by testing this guide, pointing out gaps, making suggestions and otherwise helping so that your WordPress upgrade is made as smooth as possible. In alpha order, they are: |Memo|, AJ, Bryan, ch3wbacca, Charlie, Cyndy,
Gary, Shadow, SLH, Terry, Tor
Mini FAQ
- I see an error message !!! "Fatal error: Cannot redeclare maybe_add_column() (previously declared in /home..."
- Why didn't you deactivate the plugins ? Use your ftp client and rename that plugin.
- My comments don't work
- If this happens, instead of using the comments.php that you renamed (your old one), use the default file that comes with the 1.5 download. (This error is not happening consistently yet for a definitive solution to otherwise be given).
- The Dashboard looks a little messed up
- With your browser open on the dashboard page, press CTRL-F5 (Windows) to force a page reload.
- Do I HAVE to upgrade to 1.5 ?
- No. But if you want all the nice new functions, you'll need to.
-
Something wierd has gone wrong !
- First, read over this guide from the start and check you did not miss anything out.
- Then check that all your files correctly uploaded.
- Then SEARCH FIRST at the forums for your problem.
- Then post to the forums:
- Include your WordPress website address. Not some flash intro, the actual install.
- Include a full description of your error
- Be polite please.
- A plugin does not work.
- SEARCH FIRST at the forums.
- Check the plugin author's website
- If there is no solution, post to the forum.
- Be polite please.
Show me the themes !
http://themes.wordpress.net
These pages are independent of http://wordpress.org
All design, content & images © Mark 2004-2015. All rights reserved.