Initial Setup

If this is your first time using TubePress, you’ll need to perform some initial configuration before you go further. These are one-time jobs that should take just a few minutes.
This article is part of a series on getting started using TubePress in standalone PHP.
This article applies to TubePress when used in standalone PHP. WordPress users should refer to this article instead.

You’ve downloaded and installed TubePress to your website. Great! If this is your first time using TubePress, you’ll need to perform some initial configuration before you go further. These are one-time jobs that should take just a few minutes.

  1. During installation, you uploaded the tubepress-content directory to your web server. Inside this directory, there is a file at tubepress-content/config/settings.php. Using FTP, download settings.php to your local computer and open it up with your favorite text editor.
     
  2. Initially, settings.php will look like this:
     
    <?php
    
    return array(
    
        'user' => array(
    
            'urls' => array(
    
                /**
                 * 'base' is the web-accessible URL of your TubePress installation.
                 */
                'base' => 'http://yoursite.com/path/to/tubepress_pro_x_y_z',
    
                /**
                 * 'userContent' is the URL to your TubePress Content Directory.
                 */
                'userContent' => 'http://yoursite.com/path/to/tubepress-content',
    
                /**
                 * 'ajax' is the URL where TubePress's client-side code should send its Ajax requests.
                 */
                'ajax' => 'http://yoursite.com/path/to/tubepress/ajax.php',
            ),
        ),
    );
    
  3. We'll need to set real values for the keys base, userContent, and ajax.

    1. Set base to the absolute URL to your TubePress Pro installation.
       
    2. Set userContent to the absolute URL to your tubepress-content directory.
       
    3. Set ajax to the absolute URL to ajax.php, which is right inside your tubepress-content directory.
       

      A fully complete settings.php might look something like this:

      <?php
      
      return array(
      
          'user' => array(
      
              'urls' => array(
      
                  /**
                   * 'base' is the web-accessible URL of your TubePress installation.
                   */
                  'base' => 'http://something.com/tubepress_pro_4_2_1',
      
                  /**
                   * 'userContent' is the URL to your TubePress Content Directory.
                   */
                  'userContent' => 'http://something.com/tubepress-content',
      
                  /**
                   * 'ajax' is the URL where TubePress's client-side code should send its Ajax requests.
                   */
                  'ajax' => 'http://something.com/tubepress-content/ajax.php',
              ),
          ),
      );
        
      
  4. Save settings.php and re-upload it to your web server, overwriting the file that's already there.
     
  5. Also inside the tubepress-content directory, there is a file at tubepress-content/ajax.php. Using FTP, download ajax.php to your local computer and open it up with your favorite text editor.
     
  6. Initially, ajax.php will look like this:
     
    <?php
    
    //you will not need to change this line
    define('TUBEPRESS_CONTENT_DIRECTORY', dirname(__FILE__));
    
    //change the path below to match your TubePress Pro installation
    require '/path/to/tubepress_pro_x_y_z/web/php/ajaxEndpoint.php';
    

    Update the "require" line to set the absolute filesystem path to web/php/ajaxEndpoint.php, which is stored inside your TubePress Pro installation.

    A fully complete ajax.php might look something like this:

    <?php
    
    //you will not need to change this line
    define('TUBEPRESS_CONTENT_DIRECTORY', dirname(__FILE__));
    
    //change the path below to match your TubePress Pro installation
    require '/var/www/mysite.com/tubepress_pro_4_3_4/web/php/ajaxEndpoint.php';
    
  7. Save ajax.php and re-upload it to your web server, overwriting the file that's already there.
     

YouTube - Obtain an API Key

Note

If you are not using YouTube with TubePress, you can skip this section.

TubePress needs to regularly communicate with YouTube’s servers on your behalf. To sort out all the incoming requests, and for quota purposes, YouTube mandates that everyone supplies an “API key” with each message. It’s the rough equivalent of showing someone an ID card before you have a conversation.

This process to get your own API key is easy, free, and should take less than 5 minutes. Here’s what to do:

  1. You'll need a Google account. If you don't have one, you can sign up for one for free.
     
  2. Visit the Google Developers Console.
     
  3. Once you sign in, select "Create a project..." from the "Select a project" menu near the top of the page.

    Create project button
     
  4. Enter anything you'd like for the Project name, then click the "Create" button.

    Create project button
     
  5. After the project is created (it will take a few seconds) you should be on the "Overview" page for your new project. Double-check to make sure that your new project name is visible from the menu at the top of the page.

    API's link
     
  6. Under the "Google APIs" tab, click the link for "YouTube Data API".

    Link for YouTube Data API
     
  7. Click the "Enable API" button.

    Enable API button
     
  8. After the API is enabled (it will take a few seconds), click the "Credentials" link on the left side of the page.

    Credentials link
     
  9. Click the blue "Create credentials" button.

    Add credentials button
     
  10. In the dropdown that appears, click the link for "API key".

    API key link
     
  11. Click the "Server key" button.

    Server key button
     
  12. Click the "Create" button. You can fill in the "Name" field if you'd like, but leave the other field empty.

    Create server key button
     
  13. Copy your new API key.

    Copy API key
     
  14. Inside your tubepress-content directory, there is a file at tubepress-content/config/database.json. Using FTP, download database.json to your local computer and open it up with your favorite text editor.
     
  15. Initially, database.json will look like this:
     
    {
        "googleApiKey" : "your-key-here"
    }
    

    Change your-key-here to your API key which you copied in the previous step.

    A fully complete database.json might look something like this:

    {
        "googleApiKey" : "8d635f0aa2953aab6ace68d2934e8005"
    }
    
  16. Save database.json and re-upload it to your web server, overwriting the file that's already there.
     


Last Updated Mar 28, 2016 11:16PM PDT
c65861bf7a72e1a8878bdf73cabbbdbf@tubepress.desk-mail.com
http://assets0.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete