How do I install WordPress?

WordPress is an open source content management system (CMS) based on PHP and MySQL that supports a wide variety of themes and plugins. WordPress is the most popular blogging system in the world, used by more than 60 million websites.

This article describes how to install WordPress in SEAS accounts on SEAS servers.

Note: CETS does not provide support for sites hosted at wordpress.com or other hosting providers.

Once you have staged your WordPress site, visit these helpful links for more information:

Installation

  1. You must have CGI enabled for your account.

  2. You must set a password for your MySQL database, if you haven't already. Note that a MySQL account will be created for you automatically when CGI is enabled for your account.

  3. Connect to the account via the command line (or log into a CETS-managed Linux workstation).

  4. Create the required directory with the correct permissions and install WordPress by running the following commands:

    umask 022
    mkdir -p ~/html/dynamic/wordpress
    touch ~/html/dynamic/wordpress/.htaccess
    cd ~/html/dynamic/wordpress
    wp core download
  5. Visit your WordPress site to finish the installation process (replace ~username with the account name and fling with alliance if appropriate):

    https://fling.seas.upenn.edu/~username/dynamic/wordpress/
  6. Fill in your database information:

    • Database Name: the account name
    • Username: the account name
    • Password: your MySQL password
    • Database Host: alliance.seas.upenn.edu or fling.seas.upenn.edu
    • Table Prefix: use the default unless you are installing another instance of WordPress using the same database.
  7. Follow the rest of the steps of the installation.

  8. Required: Run these commands to change the permissions on the WordPress configuration file to make sure no one can see your MySQL password:

    cd ~/html/dynamic/wordpress
    chmod 600 wp-config.php
  9. Required: Disable the WordPress Pingback feature in the Dashboard as described in Disabling XML-RPC pingback or by running these commands:

    cd ~/html/dynamic/wordpress
    wp plugin install disable-xml-rpc-pingback
    wp plugin activate disable-xml-rpc-pingback
  10. Enable permalinks if you want friendly URLs. Log into your WordPress site and select Settings > Permalinks > Post name. Save your changes. This enables friendly URLs based on the post name. Alternatively, run this command:

    cd ~/html/dynamic/wordpress
    wp option update permalink_structure '/%postname%/'

    Other naming schemes are also available.

    Important: Try to make this decision as soon as possible, as permalinks are incompatible with the original URLs generated by WordPress.

Please Contact CETS if you would like to enable PennKey authentication or have any other questions about your WordPress installation.

Updates

Please keep your WordPress site updated to avoid security vulnerabilities. Updating is easy and only takes a few moments in the WordPress Dashboard. CETS periodically scans for outdated WordPress installations and will disable sites that remain unmaintained.

Automatic Updates

The default WordPress installation will update minor versions automatically, but your site can become outdated when major version, plugin and theme updates are released. The easiest way to keep your site updated is to install the Easy Updates Manager plugin via the Dashboard or by running these commands:

cd ~/html/dynamic/wordpress
wp plugin install stops-core-theme-and-plugin-updates
wp plugin activate stops-core-theme-and-plugin-updates

After installing the plugin, visit Dashboard > Updates Options > General:

There is a risk that automatic updates will affect custom code or outdated plugins and themes. Be sure to check your site for any issues when you receive an update notification. Easy Updates Manager allows fine control over what gets updated, but CETS recommends replacing affected plugins or themes instead of exempting them from automatic updates.

© Computing and Educational Technology Services