Ammo For Sale

« « Speaking of ATF: Does this mean NFA processing will be quicker and more efficient? | Home | Yikes » »

Bleg: Can’t edit wordpress theme

So, something in the blog is all borked and I cannot edit the website theme. This is a pain in the tail and also it means that I can’t drop manage my ads.

I’m fairly certain the issue is caused by the permissions being set incorrectly (you know, that whole 577 thing). Anyone have any idea how to unfuck it?

Thanks.

10 Responses to “Bleg: Can’t edit wordpress theme”

  1. Jailer Says:

    What specifically is the error your having?

  2. jed Says:

    577? Oh dear jeebus. Are you still on some ancient hosting platform at HostingMatters? I thought you moved off shared hosting quite a while ago. Anyways, 577 equates to user-read,execute; group-read,write,execute, and others (i.e. anyone)-read,write,execute.

    Okay, that doesn’t help you much. I haven’t messed with WordPress much in years, except for one site using managed hosting at wordpress.com, and you can’t get into the guts there.

    How are you editing things? Do you connect via SSH and use a text editor? Probably would help to at least see the output from ‘ls -l’ in the directory where the file you’re trying to edit resides.

    Have you chatted with your hosting company? Maybe they’ve done some updates, and some things got messed up.

  3. Standard Mischief Says:

    Agreed, the hosting platform matters a lot and I don’t know what to do on whatever platform you’re using. I could probably figure out cpanel but don’t use it regularly.

    chmod 774 offending_file_name.txt

    would be the CLI way to do it, but even here I need to know what permissions you have, who owns the file (probably “web”, it’s owned by the app) and if you have sudo privileges.

    HTH, but it probably doesn’t.

  4. SayUncle Says:

    Sorry. Rude of me to bleg and then be away from the computer. But essentially I cannot edit my wordpress template from the word press page.

    And, yes, still at hosting matters.

    I can edit files directly by file manager but that is tedious.

  5. Jailer Says:

    Sounds like a permissions issue but from what you are describing you used to be able to do this and now you cant. Is that correct? Are you using an ad plugin or just editing the files directly to display your ads? Custom theme or free/purchased one? Have you installed any other plugins since you last edited your ads?

  6. SayUncle Says:

    It’s a fairly new to me procedure. Had never tried to edit before. So, no, i’ve never done it. It’s a custom theme. And no on new plug ins.

  7. Jailer Says:

    Ok checking your page code this is going to be beyond me since it will require direct edits. Sorry I couldn’t be of more help but it’s best I step aside for someone more knowledgeable to step up.

    I know this won’t help your current situation but the wordpress add widget is very easy to use and manage.

    https://wordpress.org/plugins/ad-widget/

  8. jed Says:

    > I cannot edit my wordpress template from the word press page.

    Yep, almost certainly a permission problem. Common in a shared hosting environment. The webserver runs as user www-data (or whatever, depending on what’s in the config file). You log in to your hosting environment as user your_name. Your files are owned by your_name, so you can edit them yourself. cPanel runs as your_name, but WordPress runs as www-data.

    You can chmod 666 the filename of interest to test this out, but I’d chmod it back to 644 after your edits are finished. You don’t need the execute bit at all, except on directories. Oh, for the duration of editing, chmod 777 the directory containing the file, but chmod 755 it after you’re finished.

    The above is valid, assuming you’re running in a shared hosting environment, where the webserver has not been configured to run your WordPress scripts as you, rather than www-data. You should ask them about this. Even GoDaddy now has this feature in place, where your website runs as you, instead of the webserver username.

  9. jed Says:

    Oh, your template might be named {something}.php, but I’m pretty sure it doesn’t need the execute bit, as it’s pulled in via an include() function.

  10. Standard Mischief Says:

    >Yep, almost certainly a permission problem.

    If you know what you are doing, you can create a PHP program that when triggered by a web page request runs as www or www-data or whatever and changes the permissions of the files or directory to something else.

    Don’t leave this kind of program around on your webserver.

    Permission/ownership problems happen all the time and your host probably has something in place, but I have no idea what that normally is. (Personally, I get a CLI, and FTP disabled by default, so atypical.)

Remember, I do this to entertain me, not you.

Uncle Pays the Bills

Find Local
Gun Shops & Shooting Ranges


bisonAd

Categories

Archives