Koozali.org: home of the SME Server

Wordpress update / templating

Offline skydivers

  • *
  • 178
  • +0/-0
Wordpress update / templating
« on: September 19, 2007, 11:59:06 AM »
Previously I used wordpress version 2.0.2 from dungog.

I checked the dungog site and there is an other version of wordpress: 2.2.1

So I did yum --enablerepo=dungog update wordpress smeserver-wordpress
and it updated wordpress.

When i went to www.myurl.com/wordpress I got the error message that there is something wrong with the userdb or password...

So I checked the wiki of wordpress and found:

The config file is now templated, so changes need to be made in a new fragment

eg. /etc/e-smith/templates/opt/wordpress/wp-config.php/05local
check which setting you want to change with

cat /opt/wordpress/wp-config-sample.php
then add the new setting in the new fragment and expand, it will overrule the old

expand-template /opt/wordpress/wp-config-sample.php

Do I have to copy /opt/wordpress/wp-config-sample.php as /etc/e-smith/templates/opt/wordpress/wp-config.php/05local ?

then make changes to /etc/e-smith/templates/opt/wordpress/wp-config.php/05local
and then restart by expand-template /opt/wordpress/wp-config-sample.php

Thanx a lot!

Offline skydivers

  • *
  • 178
  • +0/-0
Re: Wordpress update / templating
« Reply #1 on: September 24, 2007, 06:58:53 PM »
I removed the two rpm's from dungog with yum remove wordpress smeserver-wordpress

I reinstalled the two rpm's but I have still the same problems. When I checked www.mysite.com/wordpress I didn't get the wordpress setup. (probably due my previous installation) It says: "Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost."

So I check the template file at /etc/e-smith/templates/opt/wordpress/wp-config.php/10db
changed the variables to the wordpress variables (databasename, password...)

Then I try:
expand-template /opt/wordpress/wp-config-sample.php

and it says:
ERROR: No templates were found for /opt/wordpress/wp-config-sample.php.
 at /sbin/e-smith/expand-template line 45

Anyone an idea?

Offline TrevorB

  • *
  • 259
  • +0/-0
    • http://www.batley.id.au
Re: Wordpress update / templating
« Reply #2 on: September 25, 2007, 12:58:59 AM »
I reinstalled the two rpm's but I have still the same problems. When I checked www.mysite.com/wordpress I didn't get the wordpress setup. (probably due my previous installation) It says: "Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost."
Probably because you had a different password on your old DB (the new rpm's generate a random password).

You can see what password wordpress is trying to use by
Code: [Select]
config show wordpressI would go in and change the password for the wordpress user in mysql to the one in your config entry and you should then be OK.

Trevor B

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Wordpress update / templating
« Reply #3 on: September 25, 2007, 01:10:02 AM »
second step should have been
 expand-template /opt/wordpress/wp-config.php

but this isn't the problem, as all these steps are only needed if you want to change the defaults
here there is a problem with the db password
possibly the value in mysql is different to the wordpress{DbPassword} value
{{Trevor beat me to the answer}}

Quote
So I check the template file at /etc/e-smith/templates/opt/wordpress/wp-config.php/10db
changed the variables to the wordpress variables (databasename, password...)

why did you need to change this, if they weren't already wordpress variables raise a bug

Offline skydivers

  • *
  • 178
  • +0/-0
Re: Wordpress update / templating
« Reply #4 on: September 25, 2007, 08:53:28 AM »
Probably because you had a different password on your old DB (the new rpm's generate a random password).

You can see what password wordpress is trying to use by
Code: [Select]
config show wordpressI would go in and change the password for the wordpress user in mysql to the one in your config entry and you should then be OK.

Trevor B

That could be the problem indeed. Will try this this evening. Thanx!

Offline skydivers

  • *
  • 178
  • +0/-0
Re: Wordpress update / templating
« Reply #5 on: September 25, 2007, 08:55:57 AM »
why did you need to change this, if they weren't already wordpress variables raise a bug

Sorry for that, they were (are) wordpress variables.