restore page from old server
-
I have recently taken over looking after the website of our local sports club. Going through all the paperwork with the newly elected chairman of the club we found another website neither of us knew existed. About ten years ago, for the 150th anniversary of the club, a page was created with a different hosting company than the one we normally use(d). This page was created on wordpress based on a mySQL database. Neither of these has been updated since then it seems, so the page is still running wordpress 3.1.1 on mySQL 5.0.96 with PHP 5.2. I have no idea why the hosting company never got in touch to get this updated.
I have downloaded all the files and made a backup of the database. I then created a new database with our usual hosting company (mySQL 5.7) and restored the backup. A simply import did not work, but manually I managed to get it all set up. I also uploaded all the files into a directory connected to a subdomain of our main domain. I adjusted the wp-config file with the new server etc. and tried to view the page or access the admin console. In both cases I get an error “Parse error: syntax error, unexpected ‘new’ (T_NEW) in […[/wp-settings.php on line 219”
Line 219 contains this “$wp_the_query =& new WP_Query();”
Looking at lines 214 to 248 I have this:
/**
* WordPress Query object
* @global object $wp_the_query
* @since 2.0.0
*/
$wp_the_query =& new WP_Query();/**
* Holds the reference to @see $wp_the_query
* Use this global for WordPress queries
* @global object $wp_query
* @since 1.5.0
*/
$wp_query =& $wp_the_query;/**
* Holds the WordPress Rewrite object for creating pretty URLs
* @global object $wp_rewrite
* @since 1.5.0
*/
$wp_rewrite =& new WP_Rewrite();/**
* WordPress Object
* @global object $wp
* @since 2.0.0
*/
$wp =& new WP();/**
* WordPress Widget Factory Object
* @global object $wp_widget_factory
* @since 2.8.0
*/
$wp_widget_factory =& new WP_Widget_Factory();I tried to replace all of these with the lines from a working WordPress 5.8.2 installation which only brought up the next error. I assume this is caused by having a different mySQL & php Version on the new server, but is there a way I can get this to work?
The page I need help with: [log in to see the link]
The topic ‘restore page from old server’ is closed to new replies.