WordPress.org

Ready to get started?Download WordPress

Forums

Can I 'delete all files' from my database and redo a 'one-click install'? (3 posts)

  1. donjar
    Member
    Posted 1 year ago #

    I am trying to figure out how I can upload a document to a user profile, and allow the user to view the doc.

    I inserted this code into my functions.php file:

    if ( current_user_can('contributor') && !current_user_can('upload_files') )
    add_action('admin_init', 'allow_contributor_uploads');

    function allow_contributor_uploads() {
    $contributor = get_role('contributor');
    $contributor->add_cap('upload_files');
    }

    which I got from this thread, http://wordpress.org/support/topic/user-file-upload-plungins?replies=3

    Now, I get the following message every time I try to do anything in my dashboard,
    Parse error: syntax error, unexpected T_ENDIF in /home/dmacc/legacyboom.org/wp-content/themes/twentyeleven/functions.php on line 603

    I tried to go back and remove the code but was not able to. I am not sure how to fix this. This is a new site so I do not have much content on it. I use Dreamhost for hosting, and I noticed that I can "delete all files" in the 'manage one-click install' section. If I delete all files would I be able to just start over by doing another one-click install with the same database? or if there is an easier way to fix this error, please let me know.

    Thank you so much in advance for your help!

  2. leejosepho
    Member
    Posted 1 year ago #

    I use BlueHost, and it sounds to me like what you are considering might be what they call an "account reset" or "Nuke", and that worked very well for me just prior to my "one click" SimpleScripts (re-)install.

  3. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    If I delete all files would I be able to just start over by doing another one-click install with the same database?

    Kind of, it would try to set up a new DB, but you can change that in your wp-config.

    or if there is an easier way to fix this error, please let me know.

    You said you couldn't remove the code. Perhaps I can help you with that? Into what functions.php did you insert the code? twentyeleven/functions.php?

Topic Closed

This topic has been closed to new replies.

About this Topic