Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Wordpress - I give up
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Wordpress - I give up
Wordpress - I give up
04-04-2011 8:38 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I run three WP sites with Hostgator that were a cinch to install and are dead easy to maintain, I can't even get started here. I used to have a static html site and wanted to convert this to a WP site on CCGI. Changed the DNS over, got it working briefly and then recently had to upgrade it to WP 3.01. That's it - site gone - 403 error. Everything seems to have changed re advice on scripts, permissions, .htaccess etc - is this a conspiracy by Plusnet to discourage as many of their customers as possible from hosting their own websites to save on infrastructure costs? if so, it's working like a charm in my case - don't get me wrong I am very happy with PN as an ISP but as web host - don't go there.
Message 1 of 9
(2,088 Views)
8 REPLIES 8
Re: Wordpress - I give up
04-04-2011 11:41 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Presumably the update to WP 3.1 was done using the updater? Did you run the permissions script after applying the update to reset file and directory permissions to the correct ones for ccgi?
It it also necessary to reset permissions after updating plug-ins.
Upgrading was faultless for me, just reset permissions (in a separate tab) before returning to the dashboard.
It it also necessary to reset permissions after updating plug-ins.
Upgrading was faultless for me, just reset permissions (in a separate tab) before returning to the dashboard.
David
Message 2 of 9
(485 Views)
Re: Wordpress - I give up
05-04-2011 7:44 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The fact that there is a permission script that I need to run is rather the point. I see several such scripts in the forums across various threads but have no idea which one I should use - less still what they do! All this seems to be advice helpfully provided by PN users who appear to be left to fend for themselves where CGI and Wordpress are concerned. I upgraded to 3.1 from within WP and the site instantly went off line - I have no idea how to access it now - all I get is a 403 error. I can see the files in CutFTP where my overriding temptation is simply to delete the lot thanks to my considerable frustration with this entire process - which is aimed squarely at the PlusNet service in this respect and not at the PN user community who do a fantastic job.
Thanks for taking the time out to respond.
Thanks for taking the time out to respond.
Message 3 of 9
(485 Views)
Re: Wordpress - I give up
05-04-2011 4:03 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Almost certainly the problem is related to file permissions which need to be set as described in the new ccgi FAQ here. Item 7 explains the likely cause of 403 errors (incorrect file permissions). Permissions can be changed using FTP, or alternatively using the script below.
If you upload the following setwpperms.cgi script to your WordPress directory, set its permissions to 700 and run it in your browser it should reset WordPress executable file and directory permissions to the correct ones. The script assumes the user has *not* customised WordPress to use a different directory for uploaded image content.
The version upgrade requires WordPress to upgrade its MySQL tables which might require admin login to the WordPress dashboard to make the site fully functional.
[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]
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.
If you upload the following setwpperms.cgi script to your WordPress directory, set its permissions to 700 and run it in your browser it should reset WordPress executable file and directory permissions to the correct ones. The script assumes the user has *not* customised WordPress to use a different directory for uploaded image content.
The version upgrade requires WordPress to upgrade its MySQL tables which might require admin login to the WordPress dashboard to make the site fully functional.
[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]
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
Message 4 of 9
(485 Views)
Re: Wordpress - I give up
05-04-2011 5:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: btbonline is this a conspiracy by Plusnet
Almost certainly. Some of that JFK footage clearly shows a Yorkshire terrier on the grassy knoll.
Quote from: btbonline I see several such scripts in the forums across various threads but have no idea which one I should use - less still what they do!
Part of the confusion is caused by Wordpress itself, which sets permissions for uploads using a method which ignores suEXEC. suEXEC is used on the ccgi platform to stop the many users and their guest hackers running in and out of each other's houses borrowing cups of sugar.
The original script to set permissions selectively on the ccgi platform is here.
That sets folder permissions to 710, which is preferred for suEXEC, but the upload functions of Wordpress need 750 on the uploads folder and its subfolders, and this is what Wordpress recommends.
As per the original post, you can just edit that script: 'You can change "chmod 710" to "chmod 750", but don't edit "! -perm 1710", which tells the script not to chmod your root folder'.
That will work, but 750 is a bit slack to use generally, so you could just use the script as is and then set permissions on 'uploads' and subfolders to 750 using ftp, recursing for folders only. If that's too much bother then you could use David's modification, adding this line
find . -type d -regextype posix-extended -regex '.+/uploads($|/.*)' -print0 | xargs -0 chmod 750
straight after the line that reads
find . -type d ! -perm 1710 -print0 | xargs -0 chmod 710
or you could even just use the unedited script and plug Wordpress to stop it out-thinking itself, using something like:
<?php
/*
Plugin Name: Fix Upload Permissions for suEXEC
Plugin URI:
Description: Fix Upload Permissions for suEXEC
Version: 1.0b
Author: Gabe
Author URI:
*/
// Filter Hooks
add_filter('wp_handle_upload', 'upload_perms');
add_filter('wp_create_thumbnail', 'upload_perms');
add_filter('image_make_intermediate_size', 'upload_perms');
// Set Permissions
function upload_perms($file) {
$upload = (is_string($file) ? $file : $file['file']);
@ chmod( $upload, 0640 );
return $file;
}
?>
Save with no white space before
<?php
or after
?>
as fix_upload_permissions.php, upload as ascii to plugins, set permissions to 700 and activate.
I think that's about it, but I could be forgetting something.
Gabe
Message 5 of 9
(485 Views)
Re: Wordpress - I give up
05-04-2011 10:36 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Guys, I really appreciate your efforts - I have saved, uploaded, set perms and executed your suggested scripts as instructed but now I get another error - server 500???
I don't have the faintest idea what's going on here and by the looks of it I am going to have to go through this pain every time Wordpress release a new version and life's a tad too short.
Thanks again but I think I've taken this as far as I can - having significantly exceeded the boundaries of my limited knowledge. Time to pull the plug on the idea of a PN hosted site - more trouble than it is worth. The secret of success is knowing when to stop.
Regards
Andy
I don't have the faintest idea what's going on here and by the looks of it I am going to have to go through this pain every time Wordpress release a new version and life's a tad too short.
Thanks again but I think I've taken this as far as I can - having significantly exceeded the boundaries of my limited knowledge. Time to pull the plug on the idea of a PN hosted site - more trouble than it is worth. The secret of success is knowing when to stop.

Regards
Andy
Message 6 of 9
(485 Views)
Re: Wordpress - I give up
05-04-2011 11:52 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
But don't stop while there are still suggestions... wordpress does work on the Plusnet hosting 
Most likely you have a .htaccess file in your wordpress directory with some incompatible settings. If you post the contents of it then we can probably sort it out.

Most likely you have a .htaccess file in your wordpress directory with some incompatible settings. If you post the contents of it then we can probably sort it out.
Message 7 of 9
(485 Views)
Re: Wordpress - I give up
06-04-2011 8:06 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
.htaccess - there was one once - there isn't one any more. To be honest I think I may have deleted it in error out of sheer frustration and confusion. So nothing to post for you to fix I'm afraid. I relaise it won't work without one but I wasn't exactly getting much success with one either. Please don't link me to any posts on here that 'explain' how the .htaccess file works cos I think I have read them all and they may as well be written in Mandarin for all the sense they make to me. I believe you when you say that WP works on PN - just not in my case!
Message 8 of 9
(485 Views)
Re: Wordpress - I give up
06-04-2011 8:32 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: btbonline .htaccess - there was one once - there isn't one any more.
Pesky thing's probably hiding - may have to set the ftp client to show hidden files.
Good luck elsewhere.
Gabe
Message 9 of 9
(485 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page