Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: skydivers on September 19, 2007, 11:59:06 AM

Title: Wordpress update / templating
Post by: skydivers 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!
Title: Re: Wordpress update / templating
Post by: skydivers 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?
Title: Re: Wordpress update / templating
Post by: TrevorB 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
Title: Re: Wordpress update / templating
Post by: stephen noble 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
Title: Re: Wordpress update / templating
Post by: skydivers 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!
Title: Re: Wordpress update / templating
Post by: skydivers 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.