cancel
Showing results for 
Search instead for 
Did you mean: 

Installing Wordpress

Cronolis
Newbie
Posts: 3
Registered: ‎28-03-2011

Installing Wordpress

I'm attempting to install wordpress to my clients server space (plusnet) from my BT IP in my office. And i've discovered a load of obstacles.
Firstly trying to redirect or set a new default email address so I can recieve relevent instructions. It seems you can't do this???
Then Activating CGI then mySQL seems to work (I've waited over 24hours) although obviosly cant recieve any settings through email... or access mySQL admin (just hangs)
Can set up FTP to www fine, all works, uploaded WP... PHP not running.
It turns out that you have to FTP to a seperate server - CGI, fine bang in the settings, turns out you can't do this unless you are on the plusnet account served line. Arghh!
Is this why mySQL admin is not having it either?
Read the info on using telnet but I don't think this is going to help me out.
Is it the case that i'm only going to be able to install wordpress and the custom theme's im developing if i'm sat in my clients office?
All of this seems annoyingly tricky.
8 REPLIES 8
Cronolis
Newbie
Posts: 3
Registered: ‎28-03-2011

Re: Installing Wordpress

Stampy
Dabbler
Posts: 10
Thanks: 1
Registered: ‎31-03-2011

Re: Installing Wordpress

Hi,
I've also tried installing Wordpress via the above link - it goes past the install bit, but when i click the "Log In" button on the SUCCESS screen i get the following error...
Quote
Fatal error: Call to undefined function get_file_data() in /share/storage/02/ye/yesfan/wordpress/wp-includes/theme.php on line 211

Any ideas?
Cronolis
Newbie
Posts: 3
Registered: ‎28-03-2011

Re: Installing Wordpress

Havn't got there yet.. I'm still waiting for plusnet to update the DNS so www.domain.co.uk will point to CCGI servers then I've got to get then to change server type to basic or something along those lines, I'm developing this website for a client, so I've then got to go to their offices as plusNet wont allow remote FTP to their CCGI server. Most annoying for me.
this link was helpful with DNS stuff: http://usertools.plus.net/tutorials/id/14
Your problem sounds like the either the permissions are not allowing scripts to run, or plusNet's servers are not set up properly?  I've not had much dealings with this level of 'Pipe Ownership' before.
Best of luck, and keep me posted if you get anywhere as will I here.
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: Installing Wordpress

@stampy
That message suggests to me that despite WordPress saying the install was successful, in fact it wasn't and some files are missing, or as suggested in the previous reply file permissions are not set correctly so that run-time scripts don't run. Did you use Gabe's script to set file and directory permissions, or a DIY approach? Were all ASCII files uploaded as such so that line endings should be set correctly?
Presumably the theme you are trying to use is one of the standard ones which should install by default?
WordPress installs and runs fine on Plusnet's servers, and they are definitely not set up incorrectly. The security feature that requires FTP to be from a Plusnet connection is there for a reason.
David
Stampy
Dabbler
Posts: 10
Thanks: 1
Registered: ‎31-03-2011

Re: Installing Wordpress

I did use Gabe's script, and uploaded ALL the files using FileZilla FTP.
I'll take all the files down again later, and re-download a new version of Wordpress and re-load back up to the site...
I'll report back my results...
spraxyt
Superuser
Superuser
Posts: 10,063
Thanks: 1,369
Fixes: 75
Registered: ‎06-04-2007

Re: Installing Wordpress

You might find the following rmwp.cgi script useful for removing all WordPress files (except your customised wp-cofig.php). No reason why you shouldn't delete that yourself using FileZilla if you want to.
[code=rmwp.cgi]
#!/bin/bash
#
# rmwp.cgi
#
# this script removes wordpress files (except wp-config.php) and subdirectories
# from the directory in which this script resides
#
# Header tells browser what to expect.
echo Content-type: text/plain
echo
GLOBIGNORE="wp-config.php"
echo removing wordpress subdirectories and files specified ...
echo
echo removing subdirectory wp-admin ...
rm -r wp-admin
echo ... done
echo
echo removing subdirectory wp-content ...
rm -r wp-content
echo ... done
echo
echo removing subdirectory wp-includes ...
rm -r wp-includes
echo ... done
echo
echo removing xmlrpc.php, index.php and wp-\*.php files ...
rm {xmlrpc,index,wp-*}.php
echo ... done
echo
echo removing readme.html and license.txt ...
rm readme.html license.txt
echo ... done
echo
echo ... task complete
exit 0[/code]
That needs to go into the wordpress directory, set permissions to 700 and run in browser.
Removal of WordPress also needs associated tables removing from MySQL.
--------------
For installing WordPress I upload the ZIP file and use the following extractwp.cgi and setwpperms.cgi scripts to unzip and set file permissions.
[code=extractwp.cgi]
#!/bin/bash
echo -e -n "Content-type: text/html\n\n"
archive=`find . -maxdepth 1 -name 'wordpress-*.zip' -print | \
sed -r 's/^.*wordpress-([0-9]+)\.([0-9]+)\.([0-9]+)\.zip$/\1 \2 \3 &/' | \
sort -n -r -k 1,1 -k 2,2 -k 3,3 | awk '{ print $4; exit }'`
if [ -z "$archive" ] ; then
echo "Sorry, can't find any wordpress-*.zip archives in this directory"
exit 1
fi
echo "Extracting archive $archive …<br><pre>"
# test archive structure first, unzip if OK, move to cwd, remove the empty wordpress directory
unzip -tqq "$archive" && unzip -qa "$archive" && mv ./wordpress/* . && rmdir ./wordpress
errorstatus=$?
echo "</pre>"
if [ "$errorstatus" -ne 0 ] ; then
echo "Extraction not successful (return status $errorstatus)"
elif [ ! -x ./setwpperms.cgi ] ; then
echo "Extraction successful but setwpperms.cgi not found or not executable"
else
echo "Extraction successful, setting permissions …<br>"
source ./setwpperms.cgi noheader
fi[/code]
[code=setwpperms.cgi]
#!/bin/bash
if [ "$1" != "noheader" ] ; then echo -e "Content-type: text/html\n\n" ; fi
function makeadir ()
{ if [ ! -e "$1" ] ; then mkdir -m 750 "$1" ; fi }
find . -name wp-content -prune -print | while read wpcdir ; do makeadir "$wpcdir/uploads" ; done
find . -type d ! \( -perm 1710 -o -regextype posix-extended -regex '.+/uploads($|/.*)' \) -print0 | xargs -0 chmod 710
find . -type d -regextype posix-extended -regex '.+/uploads($|/.*)' -print0 | xargs -0 chmod 750
find . -type f -regextype posix-extended -regex '.*\.(php|pl|cgi)$' -print0 | xargs -0 chmod 700
echo "<table border='1' cellpadding='2' cellspacing='1'>"
echo "<tr><th>Type</th><th>Name</th><th>User, Group</th><th>Permissions</th></tr>"
find . -type d -printf '<tr><td>Folder</td><td>%p</td><td>%u, %g</td><td>%M</td></tr>\n'
find . -type f -printf '<tr><td>File</td><td>%p</td><td>%u, %g</td><td>%M</td></tr>\n'
echo "</table>"[/code]
To use these create your own wordpress subdirectory (which needn't be called "wordpress"), and upload extractwp.cgi and setwpperms.cgi to it. Set the wordpress sub directory permissions to 710, and these cgi script permissions to 700. Upload the wordpress ZIP file to this directory (permissions staying at 640), filename including version number as downloaded from the WordPress website. More than one wordpress ZIP file can be in the directory, the script uses the highest numbered version. The setwpperms.cgi script is essentially that written by Gabe with additions to create a wp-content/uploads sub-directory with permissions 750 (correct for uploaded content).
Run extractwp.cgi in your browser to extract files and set permissions. After that run the WordPress install script as normal.
After an automated WordPress version (or plugin) update running setwpperms.cgi in a separate browser tab before returning to the dashboard will reset permissions of updated files to the correct ones.
David
David
Stampy
Dabbler
Posts: 10
Thanks: 1
Registered: ‎31-03-2011

Re: Installing Wordpress

SUCCESS!!!!  Cheesy Cheesy Cheesy
Many many thanks for your help..
Had to manually extract the WP files from the Zip directory as the .cgi script said it couldn't find them!!

Site working fine now!
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: Installing Wordpress

Quote from: Stampy
Had to manually extract the WP files from the Zip directory as the .cgi script said it couldn't find them!!

Some versions, including the current latest, don't conform to the pattern being tested above.
To get the latest version of wordpress and unpack it, one could use something like

#!/bin/bash
echo "Content-type: text/plain"
echo
wget -O - http://wordpress.org/latest.tar.gz | tar xzvf -

Add bells and whistles to taste.
Gabe