puntNL 0 Report post Posted June 30, 2011 Dear Pros, Before I upgrade wordpress to 3.1.4 I need some clear advice. I have installed WP with an automated tool called 'Installatron'. (I use platformpro + base child). There are two options to upgrade WP and I'm not sure which method to choose: Method 1: Like the first time; use Installatron again to install the newest version of WP. I'm not sure if Installatron will completely overwrite the previous installation of WP.. Also I'm uncertain if the platformpro settings will be untouched. Method 2: Use Upgrade functionality in WP admin panel. However there are risks concerning the so called CHMOD settings of my files and folders with this method. (I assume that those CHMOD settings were assigned by Installatron at the first installation of wp) What method would you advice and why? If you advice method two; I ve tried that one and the following problem occured: I read that it would be clever to first upgrade php 5.2 to 5.3.x because 5.3.x would not effect my chmod settings in future WP upgrades.. To upgrade the php I did the following: I added this code to the .htaccess file: <FilesMatch ".php$"> AddHandler x-httpd-php53 .php </FilesMatch> However, I tried this method and it did not work. Lots of errors occured in my apache error log due to CHMOD settings. And worst of all: after changing some chmod settings: some settings of Platform seems to be effected (background image disappeared..). It seems that changing the CHMOD settings in some files and folders did not suit the php 5.1.3.x code in my htacces file. Before I change all CHMOD settings back to the original installation, I ask you: what would you do in this case? Some detailled help would be very welcome.. Thanks in advance, WJ Share this post Link to post Share on other sites
Simon 248 Report post Posted June 30, 2011 WJ, changing the php handler in htaccess is not going to change chmod settings. chmod is unix equivalent of file permissions. Typically they are set to 644 for files and 755 for directories. I think the problem you are seeing with your host is file ownership, ie files written by 'installertron' are not then writable by you, am i correct? If this is the case, I would change host, or ask your host why the hell they are using mod_php and demand to have them change to suphp or fastcgi. Then you wont get ownership problems as every file in your home dir is owned by you. Who is your host btw? Share this post Link to post Share on other sites
puntNL 0 Report post Posted June 30, 2011 Hi Simon, Ehm, I am pretty new with this stuff, but I think my hosting provider is pretty proffesional (www.versio.nl). I am able to re-assign the chmod permissions. They adviced me to change the php handler, so that in future wp upgrades I will not have to re-assign all my file and directory permissions over and over again.. (?) (Is it common use to change the php handler in htaccess for WP updates?) If I then change the PHP handler in htaccess, I get errors due to the chmod settings that were, indeed, not all set on 644 and 755. So I changed the settings to 644 and 755 in the domain->public_html directory. Then my site appeared to be different (background issue) When I remove the php handler, this issue is undone. Note: do I need to change the permissions all so on every sub directory within public_html directory? for example: in my public_html I also notice the folders : cgi-bin wp-admin wp-content wp-includes tnx.. Share this post Link to post Share on other sites
Simon 248 Report post Posted June 30, 2011 every file 644 every folder 755 Share this post Link to post Share on other sites
puntNL 0 Report post Posted July 6, 2011 That is a hell of a job, Simon. Every file....pfff ;-) For the good order: I also need to set the HTacces file on 644? or the htpasswd? Also the htacces file in the CGI folder? and also set 644 on the wp plugin files? also in the public_ftp folders/files set to 755/644 also the logs and stats folders, emap and maildir? I hope, after changing the php handler in htaccess that my chmod settings will not be changed in future WP or PP upgrades. Share this post Link to post Share on other sites
puntNL 0 Report post Posted July 7, 2011 P.s. Are there any other tricks known to prevent WP resetting chmod when updating? Share this post Link to post Share on other sites
Simon 248 Report post Posted July 7, 2011 Wordpress dows not change any chmod settings, you are getting yourself awfully mixed up. PHP runs in 2 modes, CGI or mod_php, and the actual webserver is a seperate process. Normally the webserver runs under the user apache, nobody, or www-data and when you open a file in your browser, if its mod_php apache will run the php itself under ITS user, therefore it needs elevated privileges to write files in your directory, this is why FTP would be a good way to upgrade because the files would stay owned by you. This method is not so secure, as the php process, running as nobody can open ANY file owned by nobody on the entire server! Now the case for CGI: When the webserver gets a request for a php page it spawns a new process owned BY YOU in your directory, so any files owned by you are easily writable by this php process, this is the prefered method for usablity for the site owner, but more importantly its more secure, because the spawned php process, under your username, is locked into your webdir, it cant view any other files on the server. Now... what does this all mean? Cheap hosts with a gazillion accounts on one server will choose the first option, mod_php every time, why? because it uses less memory and they can oversell their servers. PHP/CGI/FASTCGI/mod_fcgi ( all the same ) however although they use more memory are infinitely easier to use for the end user. Most of the BIG hosts will use CGI these days, in fact i dont think any of the major player use mod_php anymore, its just too much hassle support wise. So there is my daily rant, hope it helps you understand something ps, if your host IS using mod_php, i would just get a new host! Share this post Link to post Share on other sites
puntNL 0 Report post Posted July 8, 2011 Thanks Simon, I have checked it, they don't use mod_php. Why would they (hosting provider) advice me to use php 5.3 in the first place do you think? (Only because of those chmod cr#p?) When I add the aforementioned piece of code in my .htaccess file my background image disappears. My host says this happens because my script (I quess they mean platform pro) can not handle php 5.3... ? To conclude: I should stay on php 5.2 because it works and there are no problems with chmod settings to expect when updating Wordpress.....? :-s Share this post Link to post Share on other sites
Simon 248 Report post Posted July 8, 2011 WJ lets see a php info file, make a blank file in your webroot, call it info.php and put inside it: `<?php phpinfo(); ?>` and give me the link email it to me if you dont want it public, [email protected] Share this post Link to post Share on other sites
puntNL 0 Report post Posted July 8, 2011 Check, see mail Share this post Link to post Share on other sites
Simon 248 Report post Posted July 8, 2011 WJ If you have skype, add me @prossorguk Share this post Link to post Share on other sites