WordPress Installation Guidelines: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Overview == Basic rules for setting up and upgrading WordPress installations. == Updates == * Back up database. * If the WP installation uses a pre-packaged theme (which...") |
No edit summary |
||
| Line 107: | Line 107: | ||
* '''thousand oaks school'''<br />Thousand Oaks cannot be updated in any sort of practical manner. UC Telecom has taken it upon themselves to set the permissions of the files within the WordPress installation. Upgrading through the dashboard probably wouldn't work, and upgrading via FTP would overwrite those permissions. | * '''thousand oaks school'''<br />Thousand Oaks cannot be updated in any sort of practical manner. UC Telecom has taken it upon themselves to set the permissions of the files within the WordPress installation. Upgrading through the dashboard probably wouldn't work, and upgrading via FTP would overwrite those permissions. | ||
* '''[http://www.rsrt.org/_cms/wp-admin rsrt]''' - 3.3.1 | * '''[http://www.rsrt.org/_cms/wp-admin rsrt]''' - 3.3.1 | ||
[[Category:WordPress]] | |||
Revision as of 18:08, 11 December 2012
Overview
Basic rules for setting up and upgrading WordPress installations.
Updates
- Back up database.
- If the WP installation uses a pre-packaged theme (which should be avoided) then it should be assumed that updates will overwrite the theme files.
- It will be necessary to FTP the files from
/wp-content/themes/[theme_name]after the installation is complete. - Also, if it's ever necessary to manually upload the WP install, make sure to back up everything in the media library!
- WP installations that use the default theme don’t seem to have this issue as much.
- It will be necessary to FTP the files from
- If the installation gets interrupted then it can get stuck in maintenance mode. In these cases delete the file named
.maintenancein thewp-admindirectory.
Installation
- When installing for a client make sure to create an admin account and an editor account. Give the client the editor account without admin privileges so they can’t attempt to update WP themselves.
- Do not install WP in the default location to at least make it a little bit difficult for people to hack it.
TinyMCE/WYSIWYG Editor Configuration
- Create a separate stylesheet containing styles that can be applied through the Style dropdown in the TinyMCE editor.
- Import that stylesheet into the main stylesheet with a
@import url('/style/wysiwyg.css');directive. - Edit
functions.phpwithin the current WordPress theme’s content directory (/wp_base_dir/wp-content/themes/theme_name/)
if ( ! function_exists( 'myCustomTinyMCE' ) ):
/**
* Adds a styles dropdown menu to the tinymce visual editor buttons.
* Adds custom css classes as options to that dropdown editor.
*
* @since WPThemeName 1.0
*/
function myCustomTinyMCE($init) {
/* Adds the buttons at the begining. (theme_advanced_buttons2_add adds them at the end) */
$init['theme_advanced_buttons2_add_before'] = 'styleselect';
$init['theme_advanced_styles'] = 'footnote=footnote,head=head';
return $init;
}
endif;
add_filter('tiny_mce_before_init', 'myCustomTinyMCE' );
Applying external stylesheets to the TinyMCE editor. Edit wp-content/themes/mytheme/functions.php:
if ( ! function_exists( "rsrt_editor_styles" )) :
function rsrt_editor_styles( $url ) {
if (!empty($url)) {
$url .= ",";
}
/*
* this is how you apply other stylesheets to the TinyMCE editor
* separate multiple stylesheet URLs with commas
*/
$url .= "/css/wysiwyg.css";
return ($url);
}
endif;
add_filter("mce_css", "rsrt_editor_styles");
Additional TinyMCE Plugins
For example I wanted to use the TinyMCE "style" plugin.
From the TinyMCE download I extracted the plugins directory /tinymce.zip/tinymce/jscripts/plugins to /wpress/wp-content/plugins/tinymce_plugins. (I renamed the orginal plugins folder to tinymce_plugins.)
Then in functions.php:
function myCustomTinyMCEPlugins($plugins) {
$url = get_bloginfo('wpurl')."/wp-content/plugins/tinymce_plugins/style/editor_plugin.js";
$plugin_array["style"] = $url;
return $plugin_array;
}
add_filter("mce_external_plugins", "myCustomTinyMCEPlugins");
And add the styleprops button in the TinyMCE button callback.
see also: Adding a button to WordPress's HTML editor
Quirks involved with installing plugins
Plugin: Advanced Custom Fields
- Error: Go to define a field for the plugin. After clicking "Save Field" nothing happens and the field simply disappears.
- Fix: Forum post describing the error and the fix.
- In the WordPress database:
ALTER TABLE wp_acf_fields ADD COLUMN instructions text DEFAULT NULL;
- On line 63 of
core/fields_save.phpchange'save_as_cf' => $field['save_as_cf'],
- to
'save_as_cf' => (int)$field['save_as_cf'],
- In the WordPress database:
WordPress blogs
Note: local IIS installations require authentication via IIS in order to run the upgrade script.
- damien jay - 3.3.1
- littledamien - 3.5
- bfhhandwriting - 3.3.1
- thread bridal - 3.1
- This one is problematic. Upgrading to WP 3.1 required downloading and installing from the zip file.
- Be careful to use the correct FTP account. One FTP account updates www.threaddesign.com and the other connects to bridal.threaddesign.com.
- thread social - 3.1.3
- thousand oaks school
Thousand Oaks cannot be updated in any sort of practical manner. UC Telecom has taken it upon themselves to set the permissions of the files within the WordPress installation. Upgrading through the dashboard probably wouldn't work, and upgrading via FTP would overwrite those permissions. - rsrt - 3.3.1