Title: Step 2 Upgrade &#8211;  php file errors
Last modified: August 19, 2016

---

# Step 2 Upgrade – php file errors

 *  [starbug72](https://wordpress.org/support/users/starbug72/)
 * (@starbug72)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/step-2-upgrade-php-file-errors/)
 * Upgrading from 2.1 to 2.5 – I removed the old wp-includes and wp-admin and uploaded
   the new folders.
 * When I went to the page on my site equivalent to
    [http://example.com/wordpress/wp-admin/upgrade.php](http://example.com/wordpress/wp-admin/upgrade.php).
 * Warning: Invalid argument supplied for foreach() in …/wp-includes/query.php on
   line 683
 * Fatal error: Call to undefined function update_object_term_cache() in …/wp-includes/
   post.php on line 2745
 * I tested this out on another version first, going from 2.2 and it worked fine.
 * Any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Ilir](https://wordpress.org/support/users/ipruthi/)
 * (@ipruthi)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/step-2-upgrade-php-file-errors/#post-728370)
 * Getting the same error but I’m just changing servers. Will keep you posted.
 *  [willjohn](https://wordpress.org/support/users/willjohn/)
 * (@willjohn)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/step-2-upgrade-php-file-errors/#post-728376)
 * I’m getting the same error but on line 684.
    Warning: Invalid argument supplied
   for foreach() in /home/lembookc/public_html/blog/wp-includes/query.php on line
   684
 * Fatal error: Call to undefined function: update_object_term_cache() in /home/
   lembookc/public_html/blog/wp-includes/post.php on line 2768
 * Help! Anyone.
 *  [willjohn](https://wordpress.org/support/users/willjohn/)
 * (@willjohn)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/step-2-upgrade-php-file-errors/#post-728377)
 * I was able to fix my problem by replacing all the root files except wp-config.
   php and .htaccess with the files in version 2.5.1. I had already replaced the
   wp-admin and wp-includes files with 2.5.1 ones.
 * I hope this helps.
 *  [tydende](https://wordpress.org/support/users/tydende/)
 * (@tydende)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/step-2-upgrade-php-file-errors/#post-728380)
 * I’m having the same problem with line 684 on query.php
 * Searching it on google I see that it is a problem on many sites. I tried replacing
   the files but it’s still there. Anybody have a solution to this upgrading problem?
 * Thanks.
 *  [paamayim](https://wordpress.org/support/users/paamayim/)
 * (@paamayim)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/step-2-upgrade-php-file-errors/#post-728432)
 * I’m also getting this.
 * Warning: Invalid argument supplied for foreach() in */wp-includes/query.php on
   line 684
 * When there is /page/x in the url, to paginate.
 * Any idea?
 * Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Step 2 Upgrade – php file errors’ is closed to new replies.

## Tags

 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 5 replies
 * 5 participants
 * Last reply from: [paamayim](https://wordpress.org/support/users/paamayim/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/step-2-upgrade-php-file-errors/#post-728432)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
