Self-Hosting

Overview on Self-Hosting

You can host your dictionary at webonary.work. If you decide to set up the Webonary Plugin on your own webserver, follow the steps below.

If this sounds like more work than you ever wanted to do on a website, you may want to find someone familiar with WordPress to help you out. Happily, millions of people all over the world know WordPress, including a number of them within SIL (the developers of Webonary). To set up a dictionary for your language:

  1. Figure out what copyright or licensing you want on the site. For instance, a number of Vanuatu dictionaries use the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. (The notice can be found at the bottom of the page in any of the dictionaries.)
  2. Register a domain name, such as “OurDictionary.com”. A company such as Host Gator can do that for you.

    Find an organization or company that can “host” or run your website. This can be tricky, because you will need to find a host that allows you to adjust php.ini to enable the import of large xhtml-files.

  3. Become familiar with WordPress. The software has some great documentation and is friendly to new people.
  4. Install WordPress on your site. Some of the better web hosts have utilities that does this relatively easily. For instance, some hosts have cPanel, which is a collection of tools. One of them is called Fantastico. This installs all the software you need to run WordPress on your website.
  5. Download and install the Webonary software. You can find directions below under Download.
  6. Prepare your data. For more information, see the page regarding data formats supported.
  7. Write the informational pages and set up the menus for the site.

Web Host Setup

Configuring PhP
The initial import process can take some time. In addition, PHP defaults to uploading a max file size of 2 MB. This limit was intended for development environments. Our dictionary files are generally bigger than that. You will need to find the php.ini file for the site and make the following changes:

upload_max_filesize = 50M

post_max_size = 100M (I saw somewhere that post_max_size has to be at least the size of upload_max_size, so that’s the reason for this setting.)

max_input_time = 600

max_execution_time = 3600

output_buffering = Off (this is so that one can see the import progress shown)

extension=php_intl.dll (for normalization to work in Windows)

run “apt-get install php5-intl” (for normalization to work on a Debian server)

These settings are suggested. A web administrator may wish to tweak them.

For these settings to take effect, you must restart the Apache server. To do that, see the next section

Apache Server Restart

Restarting Apache depends on your operating system or software package. We have experience with the following two types:

WAMP

WAMP, which is used on windows machines, has a “Restart All Services” in its Quick Admin.

Linux

To restart Apache by hand:

$ sudo /usr/sbin/apache2ctl restart

There is a graceful restart as well.

Set Up
(This page is not complete.)

We’ve been mostly using the Apache Webserver, but when testing on IIS, we discovered the following issues.

Known Issues

If you are setting up your own IIS host, you may find that you need to grant Modify and possibly Write permissions to IUSR on the website folder. If you don’t, you may see one or more of the following issues:

  • When you upload an XHTML file using the SIL Dictionary plugin and you see the message “no data.”
  • When you try an automatic update of a plugin, or perhaps even an automatic update of WordPress, you are for your ftp host name, user name, and password.
  • When you try to install an a new plugin, you see a 500 Internal Server Error.

Wordpress Installation

After you’ve configured your webserver, you can install WordPress.

WordPress has a variety of documents online describing how to install WordPress, depending on your operating system and where you want to install it.

Installation Documentation from WordPress

Installing WordPress: Excellent documentation, and a must read if you are installing WordPress on your own.

WordPress Post Revision Tracking (Optional)

By default, WordPress keeps track of the changes you have made to your posts. While this may be a nice feature for a blog, it is unnecessary for an online dictionary. Your entries should be stored elsewhere, such as in FieldWorks. If you leave Post Revision Tracking on, you’ll just have extra records lying around in your database doing nothing. If you want to turn it off, find the wp-config.php in the wordpress directory. Open it with a text editor and add the following line in the file:

define(‘WP_POST_REVISIONS’, false);

Save the file and you’re set.

WordPress Set Up

Theme Installation

Upload the theme files to your WordPress theme folder wp-content/themes and activate the theme in your WordPress admin panel.

Plugins Installation
If you are using the theme as a dictionary, you will need the following plugins:

  1. Our plugin SIL Dictionary Webonary.
  2. mqTranslate (only needed for multilingual websites)
  3. For showing page numbers instead of “Previous/Next entries” below the search results, you might want to make use of WP Page Numbers.
  4. If you allow people to comment on your pages or entries, you will want some sort of anti-spam plugin. We have successfully used Akismet.

See the section “WordPress Options” below for more plugin support inherited from the base theme.

Make sure you activate your plugins once you’ve installed them.

Settings
Log in to the WordPress administration.

  1. You’ll want to have some sort of backup before starting. The minimalist way of doing this is go to Tools. Select Export. Select “All content” and press the “Download Export File” button.
  2. Go to Appearance
    1. Select Themes. Activate the webonary-zeedisplay theme, if you haven’t already.
    2. Select Widgets.
      1. Add any other widgets you want. The Links widget in particular could be helpful. Feel free to experiment.
  3. Go to Settings.
    1. Select General. Make sure all the settings there are correct.
    2. Select Reading. Select either “Your latest posts” or “A static page.”
    3. Select Discussion. You probably want most of the defaults, but here is where you decide whether you want to allow people to comment on your pages or entries. If you don’t, uncheck “Allow people to post comments on new articles.” This should be the third box down.
    4. Still in Discussion, see if you want to change any of the other options.
    5. Select Media. Near the bottom, uncheck “Organize my uploads into month- and year-based folders.”
    6. Select Privacy. You probably want the site to be visible to everyone, but can change it here if you don’t.
    7. Select Permalinks. Select Custom Structure and type “/%postname%”.
    8. If you want a multilingual website see the following instructions: Multilingual Set Up
  4. Return to Appearance
    1. Select zeeDisplay Options
      1. Assuming you are using the theme for a dictionary, leave the Mode at “Dictionary.” (You can, if you want, use the theme for an ordinary blog.)
      2. Change the Logo with your own.
    2. Select Background. If you want to change the Background image or color, this is the place to do it.
    3. Select Header. Replace the header image with your own, or remove it altogether.
Pages
Pages

You will most likely need some pages that have information about your site. For example, most sites have a Contact page. Add these pages in the Pages area.

Menus
This theme supports two menus, a top menu and a main menu. You’ll probably want to arrange your pages in the main menu.
Layout
FieldWorks Language Explorer (FLEx) is used to determine how the dictionary should look.The .css file has that layout information. It can currently be used in one of the following ways:

  1. The Webonary-zeedisplay theme can use it as a file: Once uploaded, move it over to wp-contentthemeswebonary-zeedisplay, and rename it “imported-with-xhtml.css.”
  2. (For advanced users only.) You can use it to modify the style’s style.css in wp-content/themes/webonary-zeedisplay.

In addition, a web programmer can alter the look of the site in a myriad of ways by modifying style.css and other files.[/expandsub4] FontsFonts can be set up using FLEx. Got to “Format” in the menu and select “Set up Writing Systems.” Select the Writing System you want to format and press “Modify.” Select the “Font” tab and change your default font there.

When you transfer your data from FieldWorks to the website, the layout options will be transferred in a file called a CSS file. Webonary will recognize these settings. See Data Transfer for more information.

Pictures
If you want to include pictures in your dictionary, make sure you save your images in a folder named “pictures” which should be located in the folder you specify under the “Linked Files” setting in FLEX.

Download

You need, at minimum, a Webonary theme and our WordPress plugin. For more information, see below. For general instructions about setting up a dictionary for your language, see the Overview page.

Plugins

Webonary (SIL Dictionary)

The Webonary plugin has several components. It includes a dashboard, an import for XHTML (export from Fieldworks Language Explorer), and multilingual dictionary search.

Additional plugins:

WP Page Numbers

mqTranslate

Themes

Webonary zeeDisplay

webonary-zeedisplay.zip (Version 2.9)

Our theme for bilingual or multilingual dictionaries, based on the theme zeeDisplay by ThemeZee. The following features are listed on the original theme website:

  • 9 different color schemes or pick custom color via Colorpicker
  • Easy Setup
  • Theme Option Panel
  • Custom Logo Upload
  • 3 Featured Posts Slider (Horizontal, DropDown, Fade)
  • SEO optimized
  • Google Analytics Integration
  • Highly Customizable
  • Full localized in English and German
  • CSS Styles for wp_pagenavi Plugin
  • DropDown Menus