Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Wordpress; cant find code I need to edit

  • 08-02-2014 3:24am
    #1
    Registered Users, Registered Users 2 Posts: 72 ✭✭


    Hi
    I've read the forum rules, so I hope I can stay within them!

    I'm hoping someone can give me a pointer please...

    I have a WP site for a little biz I attempted to start a while back & I am again attempting to get off the ground ( the site & the biz are works in progress :-) ). The website is www.petcosy.ie it was originally set up by a web designer & a small bit of customisation work was done on the header & general style/look, unfortunately this lady is no longer in the biz.

    I now need to change the photos, but the only way I can do this is via FTP to my files in Blacknight because the edit function in the WP dashboard doesn't work for photos...
    This may be something to with the fact that WP was installed manually by the web designer & I am not using the version from the Blacknight Application Vault?
    I did manage to change the photo on the homepage by simply replacing the photo in the file & overwriting it via FTP, however it is stretched now because the original was a landscape shape & the new one is a portrait shape...

    I can see the relevant code (pasted below) when I Inspect Element, I can even edit the width & height within Firefox browser using TextMate & it solves the issue while I'm there, but I cant find where the code resides with my files in Blacknight...

    <img class="alignright" style="margin-top: 80px; margin-bottom: 80px;" title="Insulated_Dog_Kennels" src="http://www.petcosy.ie/draft/wp-content/uploads/2011/08/Insulated_Dog-_Kennels-300x222.jpg&quot; alt="Introducing Dog Cosy Insulated Kennels by Pet Cosy." width="295" height="205">

    My question is: does anyone know where I should be looking for this code/
    Also I would appreciate some suggestions for material to read to help learn some more about editing the type of code in WP as I am interested & very keen to learn as much as possible about this...

    Thanks in advance :-)


Comments

  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    When you log into WordPress admin, does the Media option not work from the Dashboard? When you upload via the dashboard, all of the attributes should be set automatically for you with options to change the defaults. I'd really recommend not trying to tweak this with code or direct database changes.


  • Registered Users, Registered Users 2 Posts: 72 ✭✭Mr Moxie


    Hi Graham
    Thanks for your reply.

    Your message made me look at this issue again, and I realised that I used to be able to upload to the WP Dashbord when the site was set up initially... now I get this message when I try to upload a new photo:

    “Large, front.JPG” has failed to upload due to an error
    Unable to create directory /usr/local/pem/vhosts/142220/webspace/httpdocs/wp-content/uploads/2014/02. Is its parent directory writable by the server?

    I have checked the permissions and I believe they are correct, assuming that the "parent directory" is one folder up ("draft") from the "wp-content" folder... they are both set to 775...

    Over a year ago I contacted the web designer that set up the site for me initially because I was attempting to change the address in the customised header, she gave me this advice:

    "The templates can't be changed via the wordpress interface - it is something to do with the Blacknight hosting that I was never able to figure out. So what I do with wordpress sites that are hosted on blacknight when I want to make a change to the template is the following and I suggest that this is what you do;
     
    1. Get some free ftp software on your computer
    2. FTP over to the wordpress site on your domain
    3. FTP a copy of the theme files over to your own computer - the theme we are using is called simplo so they are in draft/wp-content/themes/simplo
    4. Open the template file you want to change on your own computer
    5. Make the change you want to the file and save it
    6. FTP up the changed file to the correct folder - the simplo theme folder
     
    This is how I usually work. You would need ftp access in order to put the site live at www.petcosy.ie anyway as the entire wordpress site would need to be copied from the draft folder up one level in order to put the site live and this is done using ftp.
    Putting the site live can be a bit tricky if you have not done it before so I would suggest you consider asking someone that had done this before. It is important to keep the old uploads folder in the draft folder even after you move the site up a level so that images you put in when the site was in draft don't disappear when you put the site live."

    Graham i have recently changed the address in the header using this advice, maybe I was confusing things a bit, because I followed this advice to upload a new photo, which is currently visible on the homepage, but it is stretched...

    I think the issue is something to do with the connection between WP & Blacknight??

    I think the code changing I was referring to was only to the theme and not the core WP code....

    Sorry if I'm a bit muddled, I'm trying to get the head back to where it used to be after a couple of life changing years, so please forgive the confusions :-)


  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    I really don't think it's anything to do with your particular host, I can say that with a fair degree of certainty from first hand experience.

    The reason your current picture is stretched, it's still got the size attributes set for the previous image.

    I'd check the permissions again, particularly the wp-content folder AND its sub-folders. If you get this fixed you've sorted the cause of most (all) of your problems rather than tinkering with the symptoms.


  • Registered Users, Registered Users 2 Posts: 72 ✭✭Mr Moxie


    Thank you very much Graham, I really appreciate the input.

    Since my last post here I have again been reading over the WP Codex "Changing File Permissions", so it was great to read your reply.
    I'm going to start from scratch and ensure that from the top level the permissions are high enough for WP to access what it needs, then I'll go from there if there are still issues...

    Wish me luck! :D


  • Registered Users, Registered Users 2 Posts: 72 ✭✭Mr Moxie


    Hi Graham

    I have been working away...

    In relation to the web-designers comment last year:

    "The templates can't be changed via the wordpress interface - it is something to do with the Blacknight hosting that I was never able to figure out."


    I believe this advice from Liam at Blacknight Support might sort it:

    "In relation to the permissions error. We would need to assign the FTP user ownership of the files from here, that involves a couple of steps, first you need to set php5 to run as a CGI application. You can do that by logging into the account, selecting the subscription in question form the drop-down near the top right and going to: 
     
    'Websites' > '$DOMAIN' > 'Website Configuration' > 'Edit' 
     
    Once that is done you'll need to send an e-mail to help@blacknight.com from the registered e-mail address for the account, in the e-mail you will need to include the domain name and request ownership of the files for the domain. 
     
    Once that's done we'll go ahead and change the ownership over.
    Liam:
    In relation to FTP, it's likely related to the ownership problem
    Liam:
    We'd have to sort that out first
    Mr Moxie:
    Can you see my permissions and do you know if they are correct for Wordpress to be able to access everything it needs to??
    Liam:
    It's the ownership that's the problem, permissions are fine


    Graham thanks again... I'll confirm if it worked...


  • Advertisement
  • Moderators, Society & Culture Moderators Posts: 17,643 Mod ✭✭✭✭Graham


    Sounds like your on the right track.


Advertisement