0

I'm working for a client who installed WordPress on his server. But it doesn't have upload writes because of some settings that need to be changed via command-line.

I'm trying to follow the instructions from Media Temple (where he's hosted) to enable PHP to run as FastCGI in order to give WordPress the ability to upload files to a server. Unfortunately I have to do this via command line and I have no experience with command line. Instructions are found here:

http://wiki.mediatemple.net/w/(dv)_3.5:Run_PHP_as_FastCGI_and_resolve_Apache_permission_errors

I can get as far as step 5/6

vim /var/www/vhosts/example.com/conf/vhost.conf

Add the following lines to the file:

File:vhost.conf

AddHandler fcgid-script .php
SuexecUserGroup domainuser psacln
<Directory /var/www/vhosts/example.com/httpdocs>
FCGIWrapper /var/www/vhosts/example.com/bin/php-cgi .php
Options +ExecCGI +FollowSymLinks
allow from all
</Directory>

But I have no idea how to save.

I'm very new to command line so any help would be great. I'd like to be able to give WordPress the ability to upload files soon.

Thanks in advance for helping me.

2 Answers 2

5
  1. Open the config file (step 5)
  2. Press "i" - now you are in "Insert" mode
  3. Modify the file
  4. Press "Esc" - now you are in the "Command" mode
  5. Press ":" - now you can enter commands
  6. Press "wq" - "w" = "write" and "q" = "quit"

vim Introduction

3
  • Thanks! That was my issue. Didn't know there was an "insert" mode to escape out of!
    – Ian
    Oct 27, 2011 at 8:44
  • Had the same problem when I started using the command line. :-)
    – alexvetter
    Oct 27, 2011 at 9:23
  • Thanks for the info on vim- I will have to try it.
    – Tim
    Oct 28, 2011 at 16:02
-1

Try opening the file with emacs /var/www/vhosts/example.com/conf/vhost.conf Then, make your edits using arrow keys + typing then save by pressing Control+X and then Control+S, and then exit by pressing Control+X then Control+C.

3
  • Are you serious? Ian is new to the command line. He tries to figure out how to get throw the Howto. He don't want to get involved in the religious war between vim and emacs.
    – alexvetter
    Oct 27, 2011 at 9:46
  • I wasn't attempting to be confrontational about it. I just provided the information how to open the file and how to edit and save it, like he wanted to know. A suggestion to use a certain editor isn't an attack on your beliefs, nor is it an attempt to draw somebody into a "religious war."
    – Tim
    Oct 28, 2011 at 16:02
  • I see. I didn't meant to be confrontational too. Thanks for your input too.
    – alexvetter
    Oct 29, 2011 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.