Koozali.org: home of the SME Server

Wordpress 4.3.1 on SME 8.1

Offline devtay

  • *
  • 145
  • +0/-0
Wordpress 4.3.1 on SME 8.1
« on: October 26, 2015, 10:57:30 PM »
Hello All,

I'm back and I have a problem. Big surprise, right? Anyways, we have a developer that created a site for us in Wordpress so I needed to install Wordpress on our server. After the trouble with getting OsCommerce up, I decided to install Wordpress in an iBay. I used the following steps to install wordpress in an iBay:

Code: [Select]
1. Create iBay
iBay: wp_ftav
Group: Everyone
User Access: Write = group, Read = everyone
Public Access: Entire Internet (no password)
Execution of Dynamic: Enabled
Force Secure: Disabled

2. accounts settings
PHP basedir
db accounts setprop wp_ftav PHPBaseDir /home/e-smith/files/ibays/wp_ftav:/tmp

Symlinks
db accounts setprop wp_ftav AllowOverride all
db accounts setprop wp_ftav FollowSymLinks enabled
db accounts setprop wp_ftav Indexes disabled
signal-event ibay-modify wp_ftav

3. create database
mysqladmin create wp_ftav --default-character-set=utf8

4. create user
GRANT ALL ON wp_ftav.* TO 'wp_ftav'@'localhost' IDENTIFIED BY 'passwordgoeshere';

5. download, unzip, and upload wordpress to /wp_ftav/html

6. chown -R admin:www * the files in /wp_ftav/html

7. Go to www.ftav.com/wp_ftav and follow install instructions.
Database and user wp_ftav
Password from above mysql grant statement.
Localhost.
Wordpress prefix wp_
created first user with admin permissions.

I can access the site and I can make posts, change themes, etc. However, I can't install plugins automatically or update the software or plugins automatically. Wordpress wants ftp permissions to do this and I can't figure out the right way to make proftp work. I thought it was due to the FTP settings being wrong, but even when I manually edit the proftp.conf file to allow the connection, the process never completes. Could it be related to file permissions and ownership?

Code: [Select]
[root@ html]# pwd
/home/e-smith/files/ibays/wp_ftav/html
[root@ html]# ls -la
total 192
drwxrwsr-x  5 root  shared  4096 Oct 26 16:28 .
drwxr-xr-x  6 root  root    4096 May 12  2014 ..
-rw-r--r--  1 www   shared   252 Oct 26 16:36 .htaccess
-rw-rw-r--  1 admin www      418 Oct 26 15:55 index.php
-rw-rw-r--  1 admin www    19545 Oct 26 15:55 license.txt
-rw-rw-r--  1 admin www     7360 Oct 26 15:55 readme.html
-rw-rw-r--  1 admin www     4951 Oct 26 15:55 wp-activate.php
drwxr-xr-x  9 admin www     4096 Oct 26 15:55 wp-admin
-rw-rw-r--  1 admin www      271 Oct 26 15:55 wp-blog-header.php
-rw-rw-r--  1 admin www     5007 Oct 26 15:55 wp-comments-post.php
-rw-rw-rw-  1 www   shared  3067 Oct 26 16:21 wp-config.php
-rw-rw-r--  1 admin www     2764 Oct 26 15:55 wp-config-sample.php
drwxr-xr-x  4 admin www     4096 Oct 26 15:55 wp-content
-rw-rw-r--  1 admin www     3286 Oct 26 15:55 wp-cron.php
drwxr-xr-x 12 admin www     4096 Oct 26 15:55 wp-includes
-rw-rw-r--  1 admin www     2380 Oct 26 15:55 wp-links-opml.php
-rw-rw-r--  1 admin www     3123 Oct 26 15:55 wp-load.php
-rw-rw-r--  1 admin www    34669 Oct 26 15:55 wp-login.php
-rw-rw-r--  1 admin www     8252 Oct 26 15:55 wp-mail.php
-rw-rw-r--  1 admin www    11062 Oct 26 15:55 wp-settings.php
-rw-rw-r--  1 admin www    25124 Oct 26 15:55 wp-signup.php
-rw-rw-r--  1 admin www     4035 Oct 26 15:55 wp-trackback.php
-rw-rw-r--  1 admin www     3055 Oct 26 15:55 xmlrpc.php
[root@ html]#

I have changed the access settings in the remote access panel in server manager and even installed the user remote panel. No matter the combinations or user names chosen, I can't get the process to complete. To add to the problems, the developer wants me to give him FTP access and phpmyadmin access to the database. My answer to that was no. They basically want to delete all of the files in the ibay, upload their set of files, delete all the tables from the database, and import a whole new set. Does anyone have any experience with this? Any help is appreciated.
You can't stop what's coming. It ain't all waiting on you.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #1 on: October 26, 2015, 11:48:57 PM »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #2 on: October 27, 2015, 01:08:36 AM »
Perfect. This sounds exactly like what I need. I'll try tomorrow and post back. Thanks for the help Janet.
You can't stop what's coming. It ain't all waiting on you.

guest22

Re: Wordpress 4.3.1 on SME 8.1
« Reply #3 on: October 27, 2015, 01:48:49 AM »
Why would you not use the excellent wordpress contrib available?

Offline devtay

  • *
  • 145
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #4 on: October 27, 2015, 02:11:32 AM »
I originally did use it and it was a very good contrib. I wanted the latest version and couldn't get it to update either. I also didn't want wordpress installed in /opt. My developer also wants to overwrite the install. Much easier to do via an ibay.
You can't stop what's coming. It ain't all waiting on you.

guest22

Re: Wordpress 4.3.1 on SME 8.1
« Reply #5 on: October 27, 2015, 02:26:23 AM »
My developer also wants to overwrite the install. Much easier to do via an ibay.


Interestingly dangerous ;-)

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #6 on: October 27, 2015, 02:45:05 AM »
devtay

Quote
I wanted the latest version and couldn't get it to update either.

That is/was probably due to the same Uploadtmpdir issue.
I think you need to study your subject a little better, the information is freely available & has been published here for many many years now.


Quote
My developer also wants to overwrite the install. Much easier to do via an ibay.

You might want to assess versioning issues & dependency requirements. It is all very good for a developer to use the "latest" version etc, but make sure it is compatible with php & mysql & any other dependent packages that are on your server.

If you & your developer wants the latest & greatest, then maybe you should be running SME9.1, at least you have the most recent versions of various packages then.
Also if you run a 64bit server you can avail of Software Collections to run contribs that need specific versions of packages, alongside your standard SME server packages, see the various links in this article
http://wiki.contribs.org/Software_Collections

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

guest22

Re: Wordpress 4.3.1 on SME 8.1
« Reply #7 on: October 27, 2015, 02:54:38 AM »
If you & your developer wants the latest & greatest, then maybe you should be running SME9.1, at least you have the most recent versions of various packages then.
Also if you run a 64bit server you can avail of Software Collections to run contribs that need specific versions of packages, alongside your standard SME server packages, see the various links in this article
http://wiki.contribs.org/Software_Collections


+1

Offline warren

  • *
  • 293
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #8 on: October 27, 2015, 11:32:09 AM »
you could also use the following by adding the following to the wp-config.php file :

Code: [Select]
define('FS_METHOD','direct');

Once you have the updates to WP then look at using the http://wiki.contribs.org/Uploadtmpdir

Offline devtay

  • *
  • 145
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #9 on: October 27, 2015, 01:36:20 PM »
Thanks for all the comments guys. I'll take the advice to heart. Back to the drawing board.
You can't stop what's coming. It ain't all waiting on you.

guest22

Re: Wordpress 4.3.1 on SME 8.1
« Reply #10 on: October 27, 2015, 01:39:21 PM »
Thanks for all the comments guys. I'll take the advice to heart. Back to the drawing board.


Nice and good luck. Please keep strict security in mind, it may mean a trade off of some wishes....


ps. You may want to take a look at this page too http://wiki.contribs.org/UserManager. It could be helpful on providing restricted sftp access to a specific location for a 3rd party on your system.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #11 on: October 27, 2015, 10:03:02 PM »
Installed SME 8.1 to a new virtual server. Configured as server only and fully updated it. Installed the wordpress contrib per http://wiki.contribs.org/Wordpress. Instructions worked and wordpress was up and running in a few seconds. The contrib installs v 4.2.4 which now that I think about it will probably be fine with me. That is unless a particular plugin isn't compatible or there is a security vulnerability in the version running. I decided to try and get it all going anyways just in case.

I went ahead and checked out http://wiki.contribs.org/Uploadtmpdir#Specify_the_application_tmp_folder. The wordpress contrib already has the upload_tmp_dir line in /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress

Code: [Select]
$OUT .= "    php_value mysql.default_password $wordpress{DbPassword}\n";
$OUT .= "    php_admin_value upload_tmp_dir /tmp\n";
if ($pass)
{

Just to be sure, I created /usr/share/wordpress/tmp per the instructions (to be more secure each web app needs it's own tmp dir) and modified the template according to the instructions in the link above.

Code: [Select]
$OUT .= "    php_value mysql.default_user $wordpress{DbUser}\n";
$OUT .= "    php_value mysql.default_password $wordpress{DbPassword}\n";
$OUT .= "    php_admin_value upload_tmp_dir /usr/share/wordpress/tmp\n";
if ($pass)
{

Did a signal-event console-save and verified the change to php.ini file. I have only received one PHP error to the browser window or any of the possible log files listed. This was due to a bad theme that didn't properly define a function. Once I removed the theme, I went back to no errors. Since the change was to the templates instead of the templates-custom, I decided to change the /etc/e-smith/templates/etc/httpd/conf/httpd.conf/92wordpress file back to the default. The page http://wiki.contribs.org/Uploadtmpdir#Specify_the_application_tmp_folder might read better if it reflects changing the custom templates. The way to remove the change says to delete the base template which I think would muck up the php.ini file. I'll need clarification of this then I can change the wiki page to reflect the new information.

I was able to install plugins, widgets, themes, and update them all. Also able to create pages, edit posts, make posts, etc. Base functionality is there. The problem with the update still exists. I get the following error.

Code: [Select]
Downloading update from https://downloads.wordpress.org/release/wordpress-4.3.1-no-content.zip…

Unpacking the update…

Verifying the unpacked files…

Preparing to install the latest version…

The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.: wp-includes/class-simplepie.php, wp-includes/class-phpmailer.php, wp-includes/class-smtp.php

Installation Failed

What I have found so far was alluded to by warren in a post before. I googled it and came up with it's probably related to the symlinks for class-simplepie.php, class-phpmailer.php, and class-smtp.php created by the installation of the wordpress contrib (https://codex.wordpress.org/Editing_wp-config.php read down to wordpress upgrade constants). I'm going to look through the templates and see if I can come up with a way to add the custom templates for FTP_BASE, FTP_CONTENT_DIR, and FTP_PLUGIN_DIR.

I feel like the upgrade is close. I just need to figure out the last little bit.

We own several different tld's for several domains (.com, .org, .biz, .info, .aero, etc) and I have them hosted on this server. Based on what I've read up to this point, does this mean I'll need several different statements in httpd.conf for each of the virtual domains?

Also, I want www.domain.com to be the wordpress site. As it sits now, to get to the wordpress install I need to go to www.domain.com/wordpress. I read about alternate URL's. When I do

Code: [Select]
config setprop wordpress URL http://testserver.xxxx.local
signal-event console-save

It doesn't work. I get the primary iBay default index file stating the site is under construction. When I'm done with this wordpress install, wordpress will be running our entire main site, not just a blog. I remembered this was why I decided to install it in an iBay in the first place. I couldn't figure out how to make our main web address resolve to the wordpress install. Any ideas on this would be greatly appreciated.

I'm also going to work on the sftp as RequestedDeletion mentioned.

I'm still working this and will resume tomorrow. I just wanted to post this so if anyone sees any security issues, stupid mistakes, or things I missed, it can be pointed out. As always, I appreciate the direction of everyone here. I'm the first to admit my skills are nowhere near those of the devs on this site. I'm willing to learn though.
You can't stop what's coming. It ain't all waiting on you.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #12 on: October 28, 2015, 04:58:49 AM »
devtay

Quote
I want www.domain.com to be the wordpress site. As it sits now, to get to the wordpress install I need to go to www.domain.com/wordpress. I read about alternate URL's. When I do
Code: [Select]
config setprop wordpress URL http://testserver.xxxx.local
signal-event console-save


try issuing
signal-event post-upgrade
signal-event reboot

Also/instead in the Domains panel, you can point the main domain at the ibay you want it to resolve to, rather than resolving to the Primary ibay by default.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline devtay

  • *
  • 145
  • +0/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #13 on: October 28, 2015, 02:56:55 PM »
Thanks for the reply Janet. I tried what you suggested but it didn't change anything. I think I need to actually look at the wp-config file to see where the changes are actually going for further troubleshooting. I see the URL property being added when I do config show wordpress.

The only way I can use the domains panel is if I still was installing wordpress in an iBay. I swapped over (due to recommendations in this thread) to working on trying to get the wordpress contrib where it will update. My test wordpress is installed in /usr/share/wordpress.
You can't stop what's coming. It ain't all waiting on you.

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: Wordpress 4.3.1 on SME 8.1
« Reply #14 on: October 28, 2015, 03:47:22 PM »
Have a read of THIS it may be of Help
--
qui scribit bis legit