Difference between revisions of "Wordpress"

From mi-linux
Jump to navigationJump to search
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== Uploads not allowed on this server==
 +
 +
The "upload" setting is switched off at server level for security reasons. This means that uploading media, plugins and themes to Wordpress is not possible via the Dashboard interface. This page discusses ways to achieve this via FTP.
 +
 +
== Adding themes via FTP ==
 +
 +
Let's install a new theme.
 +
 +
# Download a theme from [http://wordpress.org/themes/ http://wordpress.org/themes/]. I have chosen one called [http://wordpress.org/themes/destro Destro].
 +
# Unzip the file using 7-Zip or similar
 +
# Upload the unzipped folder (not the zip file!) to your ''wordpress/wp-content/themes'' folder (on the server)
 +
# Make the folder and all sub-folders readable and executable by all
 +
# Also make sure that you only have one sub-folder, so for example the theme should be stored in ''wordpress/wp-content/themes/destro'', NOT ''wordpress/wp-content/themes/destro/destro''
 +
# The theme should now appear on your dashboard/appearance/themes page. Simply activate it.
 +
 
==Adding plugins via FTP==
 
==Adding plugins via FTP==
 +
 +
Let's install a plugins from the [http://wordpress.org/plugins/ Wordpress Plugin Directory]
 +
 +
# Choose a plugin, for example [http://wordpress.org/plugins/amazon-link/ Amazon Link]
 +
# Download the zip file
 +
# Unzip the file using 7-Zip or similar
 +
# Upload the unzipped folder (not the zip file!) via FTP to your ''wordpress/wp-content/plugins'' folder
 +
# Make the folder and all sub-folders readable and executable by all
 +
# Also make sure that you only have one sub-folder, so for example the plugin should be stored in ''wordpress/wp-content/plugins/amazon-link'', NOT ''wordpress/wp-content/plugins/amazon-link/amazon-link''
 +
# Go to your website's dashboard, plugins section. The plugin should now be listed. '''Activate it'''.
  
 
==Adding media via FTP==
 
==Adding media via FTP==
  
=== Install Add From Server plugin ===
+
=== Install "Add From Server" plugin ===
  
* Download this plugin: [http://wordpress.org/plugins/add-from-server/ http://wordpress.org/plugins/add-from-server/]
+
# Download this plugin: [http://wordpress.org/plugins/add-from-server/ http://wordpress.org/plugins/add-from-server/]
* Unzip it using 7-Zip
+
# Install the plugin (see previous section)
* Upload the unzipped folder via FTP to your ''wordpress/wp-content/plugins'' folder
 
* Make the folder and all sub-folder writable and executable by all
 
* Make sure that you only have one sub-folder, so for example the plugin should be stored in ''wordpress/wp-content/plugins/add-from-server'', NOT ''wordpress/wp-content/plugins/add-from-server/add-from-server''
 
* Go to your website's dashboard, plugins section. The "Add From Server" plugin should now be listed. Activate it.
 
  
=== Use Add From Server plugin to add media ===
+
=== Use "Add From Server" plugin to add media ===
  
 
# Create a new temporary folder for your media (on the server), for example ''wordpress/wp-content/media''
 
# Create a new temporary folder for your media (on the server), for example ''wordpress/wp-content/media''
# Create a new permanent folder for your media (on the server) called ''wordpress/wp-content/uploads''
+
# Create a new permanent folder for your media (on the server) called ''wordpress/wp-content/uploads'' (with an "s")
 
# Make sure that the 2 folders above has read/write/execute rights for everyone
 
# Make sure that the 2 folders above has read/write/execute rights for everyone
# Upload your media (for example an image) via FTP to the folder above
+
# Upload your media (for example an image) via FTP to the ''media'' folder (specified in step 1)
 
# Make sure that the file above has read permissions for everyone
 
# Make sure that the file above has read permissions for everyone
 
# Go to your dashboard, plugins section, and click on "Import files" under the "Add From Server" entry.
 
# Go to your dashboard, plugins section, and click on "Import files" under the "Add From Server" entry.
# Select the folder created in step 1 (in our case ''media'')
+
# Select the folder to import media from (created in step 1 - in our case ''media'')
# Select the file to be imported into your library (uploaded in step 4)
+
# Select the file to be imported into your library (uploaded in step 4).
# Press the import button
+
# Press the ''import'' button. This will move the file from the temporary folder (step 1) to the permanent folder (step 2) and add it to your media library.
  
 
Now when browsing to Dashboard/Media, you should see your image listed.
 
Now when browsing to Dashboard/Media, you should see your image listed.
  
== Add themes via FTP ==
+
==Allowed memory size exhausted==
 +
 
 +
When using various CMS's or frameworks you may encounter the following error:
 +
 
 +
<pre>
 +
Allowed memory size of 16777216 bytes exhausted
 +
</pre>
 +
 
 +
This means that your PHP script is trying to use more memory than you are allowed on the server.
 +
 
 +
Fortunately you can increase this limit:
 +
 
 +
# Open a text editor (Notepad++ or PSPad)
 +
# Create a new file
 +
# Paste the following command in the file: '''php_value memory_limit 64M'''
 +
# Save the file as '''.htaccess''' (including the dot)
 +
# Upload the file via FTP to the folder that you are trying to access when getting the error (e.g. public_html/joomla)
 +
 
 +
'''Important:''' If the folder already contains a file called .htaccess please DO NOT override it. Simply open it and add the line specified in step 3 at the end of the file.

Latest revision as of 12:32, 24 February 2015

Uploads not allowed on this server

The "upload" setting is switched off at server level for security reasons. This means that uploading media, plugins and themes to Wordpress is not possible via the Dashboard interface. This page discusses ways to achieve this via FTP.

Adding themes via FTP

Let's install a new theme.

  1. Download a theme from http://wordpress.org/themes/. I have chosen one called Destro.
  2. Unzip the file using 7-Zip or similar
  3. Upload the unzipped folder (not the zip file!) to your wordpress/wp-content/themes folder (on the server)
  4. Make the folder and all sub-folders readable and executable by all
  5. Also make sure that you only have one sub-folder, so for example the theme should be stored in wordpress/wp-content/themes/destro, NOT wordpress/wp-content/themes/destro/destro
  6. The theme should now appear on your dashboard/appearance/themes page. Simply activate it.

Adding plugins via FTP

Let's install a plugins from the Wordpress Plugin Directory

  1. Choose a plugin, for example Amazon Link
  2. Download the zip file
  3. Unzip the file using 7-Zip or similar
  4. Upload the unzipped folder (not the zip file!) via FTP to your wordpress/wp-content/plugins folder
  5. Make the folder and all sub-folders readable and executable by all
  6. Also make sure that you only have one sub-folder, so for example the plugin should be stored in wordpress/wp-content/plugins/amazon-link, NOT wordpress/wp-content/plugins/amazon-link/amazon-link
  7. Go to your website's dashboard, plugins section. The plugin should now be listed. Activate it.

Adding media via FTP

Install "Add From Server" plugin

  1. Download this plugin: http://wordpress.org/plugins/add-from-server/
  2. Install the plugin (see previous section)

Use "Add From Server" plugin to add media

  1. Create a new temporary folder for your media (on the server), for example wordpress/wp-content/media
  2. Create a new permanent folder for your media (on the server) called wordpress/wp-content/uploads (with an "s")
  3. Make sure that the 2 folders above has read/write/execute rights for everyone
  4. Upload your media (for example an image) via FTP to the media folder (specified in step 1)
  5. Make sure that the file above has read permissions for everyone
  6. Go to your dashboard, plugins section, and click on "Import files" under the "Add From Server" entry.
  7. Select the folder to import media from (created in step 1 - in our case media)
  8. Select the file to be imported into your library (uploaded in step 4).
  9. Press the import button. This will move the file from the temporary folder (step 1) to the permanent folder (step 2) and add it to your media library.

Now when browsing to Dashboard/Media, you should see your image listed.

Allowed memory size exhausted

When using various CMS's or frameworks you may encounter the following error:

Allowed memory size of 16777216 bytes exhausted

This means that your PHP script is trying to use more memory than you are allowed on the server.

Fortunately you can increase this limit:

  1. Open a text editor (Notepad++ or PSPad)
  2. Create a new file
  3. Paste the following command in the file: php_value memory_limit 64M
  4. Save the file as .htaccess (including the dot)
  5. Upload the file via FTP to the folder that you are trying to access when getting the error (e.g. public_html/joomla)

Important: If the folder already contains a file called .htaccess please DO NOT override it. Simply open it and add the line specified in step 3 at the end of the file.