Showing posts with label Wordpress. Show all posts
Showing posts with label Wordpress. Show all posts

Wednesday, June 9, 2010

Catchable fatal error: Object of class WP_Error could not be converted to string

Problem Description
In the environment of
WPMU 2.9.2
BP 1.2.3
PHP 5.2.13
BuddyPress Groupblog 1.4.4
the buddypress groupblog accessing blog tab fails with error below.
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/kunstfac/public_html/wp-includes/wp-db.php on line 488
The url will be like, http://{website_name}/groups/{group_name}/blog/

Cause of the problem
The problem happened due to bug of BuddyPress Groupblog version 1.4.4.

Solution of the problem
Since this is bug of this BuddyPress Groupblog 1.4.4 version so it is expected bug will be resolved in the next version of this plugin. However you can follow following workaround to make the plugin or blog section work.

The idea is don't create the group and groupblog at the same time.

Step 01: Visit the Site Admin > Blogs. Create a new Blog. Ensure that blog is created by visiting wp-admin/wpmu-blogs.php

Step 02: From the frontend after login as admin Create a group as usual but do not create a new groupblog. Instead at 3. Group Blog click the checkbox "Enable group blog" and then Use one of your own available blogs and from dropdown box select your blog.

Step 03: Go through next steps and you will see your blog is working perfect.

Friday, May 28, 2010

How to enable theme and plugin editor for wordpress mu

After you install and login for first time in wordpress mu you will be astonished that under Appearance tab there is no longer present an "Editor" link and under under Plugins section there is no longer present "Plugin Editor" on Dashboard in WPMU. So you might wonder how you will change a theme or plugin or a stylesheet file from wordpress.

Following is a screenshot about how you see Appearance section.


You can get the editor by installing plugin or manually changing files in wordpress.

Installing Enable Theme and Plugin Editor (WPMU) plugin
You can get theme and plugin editor by simply,
- Login to Wordpress dashboard as site administrator.
- Under Plugins tab click on Add New.
- Install Plugin window will appear. You will see Search for plugins by keyword, author or tag.
- Choose Term from drop down menu, in the textbox type "Enable Theme and Plugin Editor" and then search Plugin. You will see "Enable Theme and Plugin Editor (WPMU)" there. Just install it and activate the plugin. You will see your editor for theme and plugin will appear in wordpress MU.

Manually Installing Enable Theme and Plugin Editor (WPMU) plugin

- Download the "Enable Theme and Plugin Editor (WPMU)" plugin from http://wordpress.org/extend/plugins/enable-theme-and-plugin-editor/.

- Using an FTP editor upload the plugin file(s) or folder to the /wp-content/plugins folder.

- Login to Wordpress dashboard as site administrator and click on Plugins.

- You should see your new Plugin listed. To turn the Plugin on, click Activate on the far right side of the list.

- After you activate you will see theme and plugin editors are enabled and you can modify files within wordpress admin panel.

Manually changing Wordpress files
- Go to wp-admin/includes folder of your Wordpress MU installation directory.
- You have to edit the mu.php file. Open the mu.php file with any editor software and search for the term "unset( $submenu['themes.php'][10]"); " and "unset( $submenu['themes.php'][10] );" . You have to comment both of these two lines.

So, before changes
unset( $submenu['plugins.php'][15] ); // always remove the plugin editor
unset( $submenu['themes.php'][10] ); // always remove the themes editor
And After Changes
/* unset( $submenu['plugins.php'][15] ); */ // always remove the plugin editor
/* unset( $submenu['themes.php'][10] ); */ // always remove the themes editor

- After you commented above two lines, you should be able to see the theme editor and plugin editor option but still those pages will not accessible. To overcome that, you need to make below changes in mu.php file.

Search for the term "if ( strpos( $_SERVER['PHP_SELF'], 'user-new.php'" inside mu.php file you will see following Before Changes lines. Then you need to make it like After Changes.

Before Changes
$pages = array( 'theme-editor.php', 'plugin-editor.php' );
foreach( $pages as $page ) {
if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {
wp_die( __('Page disabled by the administrator') );
After Changes
$pages = array( 'theme-editor.php', 'plugin-editor.php' );
foreach( $pages as $page ) {
if ( strpos( $_SERVER['PHP_SELF'], $page )&& !is_site_admin() ) {
wp_die( __('Page disabled by the administrator') );
Now check on your Wordpress MU dashboard. You will find the theme editor and plugin editor is working properly in your MU installation.

Wednesday, May 26, 2010

How to install a Wordpress theme

In the post Introducing wordpress theme I have already discussed about wordpress theme. Now in this post I will discuss how we can install and activate a wordpress theme.

Whenever you install wordpress you already have noticed that there is a default blue style theme and a WordPress Classic 1.5 by Dave Shea. But for your website you of course will try some good and attractive theme. Following steps will help you.

Automatic Installation of Wordpress theme using Wordpress Administration Panel.
Step 01. Log in to the WordPress Administration Panel.

Step 02. Select the Appearance panel, then Themes.

Step 03. Select Add New Themes

Step 04. Use the sub-menu or the Search or Filter options to locate a theme you would like to use.

Step 05. Click on the Preview link to preview the theme.

Step 06. If you are satisfied with the preview use the Install link to upload the theme to your blog. You may need to provide your ftp information in this phase.

Step 07. After you install wordpress theme you will get a message like below.
Downloading install package from http://wordpress.org/extend/themes/download/......zip

Unpacking the package.

Installing the theme.

Successfully installed the theme ................

Actions: Preview | Activate | Return to Theme Installer

You will have three options. Now you need to click on Activate to apply the theme.

Alternatively, you can activate your theme from http://domain_name/wp-admin/themes.php

Manual Installation of wordpress theme
Step 01: Choose a theme to use for your site.
At first you need to find out suitable themes for your website. There are lots of free and paid wordpress themes. You can either google it or you can find it from wordpress site. After you choose the suitable theme download the theme zip file.

Step 02: Extract the theme zip file.
Once you download the theme extract the zip file using unzip or unrar utility. Review the readme.txt and any screenshot of the template. There might also have index.html file.

Step 03: Upload the theme directory into wordpress wp-content/themes folder.
After you download and extract the theme folder upload the theme folder into wordpress site's wp-content/themes directory. For example if you theme name is SkyTheme then all theme files will under under sitename/wp-content/themes/SkyTheme. You can use ftp or ssh to upload the theme files. FileZilla is an example of good ftp client software.

Step 04: Activate the theme.
The theme files are uploaded and now you need to activate the theme. To activate the theme.
- Log in to the WordPress Administration Panel.
- Select the Appearance panel, then Themes.
- From the Available Themes section, you will see your theme. Click on the theme title (or theme screenshot) for the theme you wish to activate.
- A preview of the theme will be shown.
- To activate the theme click the Activate "Theme Name" link in the top right.

Note that, if the theme preview is blank, do not activate the new theme without investigating further. Your site may not be displayed correctly, otherwise.

Related Documents
Introducing wordpress admin panel
Fatal error: Allowed memory size of 33554432 bytes exhausted
How to add a logo to wordpress site
How to transfer wordpress site to new domain
Introducing wordpress theme
How to install wordpress

How to display multiple images from one thumbnail using lightbox

With lightbox wordpress plugin you can present your group of images in a slick window, while darkening the rest of the page which makes your site professional looking. Now if there is two many images then you might think about group of images. For example, you can think in one group there will be 50 images and in another group there will be 60 images. Displaying 50 and 60 images in one page increases loading time as well as space is wasted and make sites unprofessional looking. So you might wonder how to keep only one thumbnail and clicking on thumbnail will load multiple images.

Let's say we have the following codes, which is used to display 10 images and we have 10 thumbnails through lightbox. Now our goal will be display only first image thumbnail and upon clicking on first image we can go backward and forward to display rest of the images.

<a href="http://arju-on-it.com/wp-content/uploads/HKMagazine.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Magazine" src="http://arju-on-it.com/wp-content/uploads/HKMagazine.jpg" alt="HK Magazine Interviews Fion Chang AKA Hong Kong's Makeup Magician" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides evening gowns.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Brides" src="http://arju-on-it.com/wp-content/uploads/HK Brides evening gowns.jpg" alt="Elegant Evening Gown" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides floral evening gown.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Brides" src="http://arju-on-it.com/wp-content/uploads/HK Brides floral evening gown.jpg" alt="Floral Evening Gown" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides gold evening dress.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Brides gold" src="http://arju-on-it.com/wp-content/uploads/HK Brides gold evening dress.jpg" alt="Gold Evening Dress" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides jade evening dress.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Brides jade" src="http://arju-on-it.com/wp-content/uploads/HK Brides jade evening dress.jpg" alt="Jade Evening Dress" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides pink evening gown.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Brides pink" src="http://arju-on-it.com/wp-content/uploads/HK Brides pink evening gown.jpg" alt="Pink Evening Gown" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides scarlet red evening gown.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Brides scarlet" src="http://arju-on-it.com/wp-content/uploads/HK Brides scarlet red evening gown.jpg" alt="Scarlet Red Evening Gown" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/bridal bouquet.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="Bridal Magazine" src="http://arju-on-it.com/wp-content/uploads/bridal bouquet.jpg" alt="Bridal Bouquet Couple" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/my garland.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="Bridal Magazine Garland" src="http://arju-on-it.com/wp-content/uploads/my garland.jpg" alt="My Garland" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/greenery.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="Bridal Magazine wedding" src="http://arju-on-it.com/wp-content/uploads/greenery.jpg" alt="Wedding Greenery" width="60" height="70" /></a>

The idea we need to make the first image to be loaded via <img> tag and for rest of the images there will be no <img> tag. So re writing my code as following.

<a href="http://arju-on-it.com/wp-content/uploads/HKMagazine.jpg"><img class="alignleft" style="border: 1px solid black; margin-left: 3px; margin-right: 3px;" title="HK Magazine" src="http://arju-on-it.com/wp-content/uploads/HKMagazine.jpg" alt="HK Magazine Interviews Fion Chang AKA Hong Kong's Makeup Magician" width="60" height="70" /></a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides evening gowns.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides floral evening gown.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides gold evening dress.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides jade evening dress.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides pink evening gown.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/HK Brides scarlet red evening gown.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/bridal bouquet.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/my garland.jpg"> </a>

<a href="http://arju-on-it.com/wp-content/uploads/greenery.jpg"> </a>

The above code will work and it will display multiple images under one thumbnail. Since it is defined via the img tag, but the others have no content, but will still be parsed by the lightbox script.

In a nutshell, to make one thumbnail and multiple images write code in this way,

<a href="image_url"><img src="imageurl" alt="Arju on IT" width="60" height="70" /></a>

<a href="image_url"> </a>

<a href="image_url"> </a>


An important note is to follow the space and indentation as required. If you don't follow lightbox-2 code will not work.

Friday, January 29, 2010

Fatal error: Allowed memory size of 33554432 bytes exhausted

Problem Description
In the wordpress dashboard Plugins, Incoming Links section does not load and loading fails with message,
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1966080 bytes) in /home/nextlew4/public_html/arju-on-it.com/wp-includes/class-simplepie.php on line 5409

Also, whenever you try to upgrade any plugin it fails with message,
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2350382 bytes) in /home/nextlew4/public_html/arju-on-it.com/wp-includes/http.php on line 1365

Cause of the Problem
From the wordpress release of 2.5, within wp-settings.php file there is parameter WP_MEMORY_LIMIT which allows you to specify the maximum amount of memory that can be consumed by PHP. The default value for WP_MEMORY_LIMIT is limit to 32MB. So by default, WordPress will attempt to increase memory allocated to PHP to 32MB (you can find this code at beginning of wp-settings.php).

Note that, this setting imposes memory limit to usage memory of PHP only for WordPress, not other applications.

Solution of the Problem
If wordpress PHP needs more memory than the value set inside wp-settings.php you will receive a message such as "Allowed memory size of xxxxxx bytes exhausted".

So the setting in wp-config.php should reflect something higher than 32MB.

You will find the wp-config.php file under wordpress home installation directory. If you open the file you will see the following lines at the beginning of the file.

if ( !defined('WP_MEMORY_LIMIT') )
define('WP_MEMORY_LIMIT', '32M');


Increase the limit to somewhere bigger value. For example to increase PHP Memory to 64MB

define('WP_MEMORY_LIMIT', '64M');

Increase PHP Memory size to 100MB
define('WP_MEMORY_LIMIT', '100M');


Please note that, this setting may not work if your host does not allow for increasing the PHP memory limit. If after increasing limit from wp-settings.php you still get "Fatal error: Allowed memory size of 33554432 bytes exhausted" contact your host to increase the PHP memory limit. Note that many hosts set the PHP limit at 8MB.

Related Documents
http://arjudba.blogspot.com/2010/01/how-to-add-logo-to-wordpress-site.html
http://arjudba.blogspot.com/2010/01/how-to-transfer-wordpress-site-to-new.html
http://arjudba.blogspot.com/2010/01/introducing-wordpress-theme.html
http://arjudba.blogspot.com/2010/01/how-to-install-wordpress.html

Friday, January 22, 2010

How to add a logo to wordpress site

Step 01: Login to wordpress admin panel.
Step 02: Under the Appearance section click on Editor.

Step 03: The header.php file controls the logo section of a wordpress site. So open the header.php file for edit.

Step 04: Find out the section <div id="header"> within header.php. Within <div section, id="header"> you will see a line something similar.

<h1><a href="<?php echo get_option('home'); ?>"><?php bloginfo('name'); ?></a></h1>

Step 05: Delete the part
<?php bloginfo('name'); ?>
from above line. If you want to know what does <?php bloginfo('name'); ?> mean then please have a look at temaplate tags from Introducing wordpress theme.

And replace the deleted part with this line:

<img src="the url to image" alt="site logo" />

If your image name is logo.jpg and you keep it under images folder then it should look like,

<h1><a href="<?php echo get_option('home'); ?>">
<img src="images/logo.jpg" alt="site logo" />
</a></h1>


Step 06: Update the file and check load the url of your wordpress home page to see how it looks. You can use image height, width property to resize your logo but it is always better first resize by photoshop/gimp and then use it as logo.

Related Documents
http://arjudba.blogspot.com/2010/01/how-to-transfer-wordpress-site-to-new.html
http://arjudba.blogspot.com/2010/01/introducing-wordpress-theme.html
http://arjudba.blogspot.com/2010/01/how-to-install-wordpress.html

Thursday, January 21, 2010

How to transfer wordpress site to new domain or new location - Way 1

Wordpress stores two address urls inside the database.
One address url determines the location of your blog files.
Another address url determines the location of main index.
If you do default install then both blog address and main index urls will be same.

There are two reasons when you need to change one of the two address urls.

1) You want to change the wordpress url or blog url or you have tried to change the Blog URL or WordPress URL in Settings, and an error has occurred.

2) You want to move/copy your wordpress site to a new domain/new hosting server.

Following is the step by steps procedure about how to transfer wordpress site to new domain or new location.

Step 01: Backup/Export full database from your old wordpress site.
Note that this step is not required if you want to move/transfer your wordpress site in your same hosting provider cpanel even if you want to move to a new domain in the same hosting server. This step is only required if you want to transfer your wordpress site to a new hosting server or if you want to copy wordpress site across your new domain.

You can use command line tool and any GUI tool to backup database. If you use command line mysqldump tool then you can issue following command, to export a mysql database - named wordpress_01 where username is root and password is prema and dumpfile name is d:\dump.sql

E:\>mysqldump -u root -pprema wordpress_01 >d:\dump.sql

If you use phpmyadmin GUI browser then you can do:
- Login to phpmyadmin
- From the left side click on your desired database that you want to export.
- Database Structure is displayed. Click on Export tab.
- Select all the tables and select radio button as SQL (though these two are selected by default)
- You can choose Compression to None or "zipped" or "gzipped". And then click Go.
- You have now your wordpress database backup.

Step 02: Create a new Wordpress database in the new hosting server.
Note that this step is not required if you want to move/transfer your wordpress site in your same hosting provider cpanel even if you want to move to a new domain in the same hosting server. This step is only required if you want to transfer your wordpress site to a new hosting server or if you want to copy wordpress site across your new domain.

You can use command line tool and any GUI tool to create a new wordpress database in the hosting server where you want to copy wordpress site or transfer wordpress site.
To create a new mysql database named wordpress_new using command line tool issue following command after login as admin user,
mysql> create database wordpress_new;
Or you can use your cpanel to create new mysql database. After login to cpanel click on the MySQL Databases and then create database.

After you create new database,
- Add New User. Create a new username and password. It is easy in cpanel. If you are good at command line interface have a look at Create user in mysql.

- After you create user assign the user to the new database created.

Step 03: Download and upload (Transfer/Copy/Move) all WordPress files & folders to new site:
Copy/Move/Transfer whole wordpress directory from your old site to your new site. You can use any ftp tool to do that for example FileZilla Ftp Client. If you have ssh access to your server you can scp/cp files from your old site to your new site. Note that you must transfer whole wordpress site so it should include your theme files, template files, plugin files.

Step 04: Modify file wp-config.php:
If you open wp-config.php file you will see lines like,
/** The name of the database for WordPress */
define('DB_NAME', 'mysql_arju');
/** MySQL database username */
define('DB_USER', 'mysql_arju');
/** MySQL database password */
define('DB_PASSWORD', 'arju');
/** MySQL hostname */
define('DB_HOST', 'localhost');

Now change these values of mysql database, username and password to accommodate values for new site mysql database. In this example, it should be
define('DB_NAME', 'wordpress_new');
define('DB_USER', 'arju');
define('DB_PASSWORD', 'test');

Note that above change of DB_NAME, DB_USER, DB_PASSWORD is not required if you want to transfer site in the same server or if you want new server but there you have database, username, password with the same name as it was in old site.

Adding the following lines are extremely important if you like to change your domain name or to change your wordpress/blog location in the same domain.

define('WP_HOME','http://arju-on-it.com');
define('WP_SITEURL','http://arju-on-it.com');


where http://arju-on-it.com will be the new address url for my both wordpress home and blog site.

Step 05: Import (upload) the previously backup database.
Note that this step is not required if you want to move/transfer your wordpress site in your same hosting provider cpanel even if you want to move to a new domain in the same hosting server. This step is only required if you want to transfer your wordpress site to a new hosting server or if you want to copy wordpress site across your new domain.
Using command line tool or using graphical user interface you can import the previous exported database.
If you use phpmyadmin then just select your database, click the Import tab, click Choose file button and choose the sql file that you exported previously (if you have gzipped/zipped version then you need to unzip it) and then click Go. You can check list of tables imported into database.
If you use command tool then you can use mysqlimport tool to load tables from the sql files into mysql database.

Step 06: Change the Urls in the database wp_options and wp_posts tables:
You need to change url addresses from database to adapt the urls of new domain/new location.

To fix URLs of the WordPress posts and pages issue,

UPDATE wp_posts SET guid = REPLACE (guid,'http://old_site_url.com','http://new_site_url.com');

If you have linked internally within blog posts or pages with absolute URLs, these links will point to wrong locations after you move your site. Use the following SQL commands to fix all internal links to own blog in all WordPress posts and pages:

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old_site_url.com', 'http://www.new_site_url.com');

Update WordPress options with the new site url, by using following SQL command:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old_site_url.com', 'http://www.new_site_url.com') WHERE option_name = 'home' OR option_name = 'siteurl';

Friday, January 15, 2010

Introducing Wordpress Theme

In the post Wordpress Admin Panel I have introduced about wordpress admin panel. In this post I will discuss about wordpress theme. Wordpress theme is a collection of files that work together to produce the graphical interface with an underlying design for the website.

Wordpress theme uses combination of three things.
A)Template Files.
B)Template Tags.
C)CSS Style Sheets.

A)Template Files: Template files are the files (building blocks) which come together to create the site. The header, sidebar, content, footer are all individual template files.

The following are the template files typically included within a Theme.

i) 404 Template = 404.php
ii) Archive Template = archive.php
iii) Archive Index Page = archives.php
iv) Comments Template = comments.php
v) Footer Template = footer.php
vi) Header Template = header.php
vii) Links = links.php
viii) Main Template = index.php
ix) Page Template = page.php
x) Popup Comments Template = comments-popup.php
xi) Post Template = single.php
x) Search Form = searchform.php
xi) Search Template = search.php
xii) Sidebar Template = sidebar.php

B) Template Tags: Template Tags are small piece of code which provide instructions and requests for information stored within the WordPress database. It instructs WordPress to "do" or "get" something. For example after login to wordpress Dashboard if you open template file header.php ( from Appearance>Editor) you will notice template tags like below.

<?php language_attributes(); ?>
<?php bloginfo('html_type'); ?>
<?php bloginfo('charset'); ?>
<?php bloginfo('name'); ?>
<?php bloginfo('stylesheet_url'); ?>
<?php bloginfo('pingback_url'); ?>
<?php wp_get_archives('type=monthly&format=link'); ?>
<?php //comments_popup_script(); // off by default ?>
<?php wp_head(); ?>
<?php bloginfo('url'); ?>

Each of these template tags instructs wordpress to "do" or "get" something. Let's introduced with bloginfo temaplte tag with some parameters that it take.
1)Site Name <?php bloginfo('name'); ?> : The bloginfo template tag with name parameter is used to display the site name that is set by admin via Settings> General subpanel.

2)Site Description <?php bloginfo('description'); ?> : The bloginfo template tag with description parameter displays some descriptive sentence that says the blog/site about. Generally it is called tagline. This is set by admin via Settings> General subpanel.

3)Site url <?php bloginfo('url'); ?> : The bloginfo template tag with url parameter is used to display the URL or website address for your WordPress site. This is set by admin via Settings> General subpanel.

4) Admin Email <?php bloginfo('admin_email'); ?> : bloginfo template tag with admin_email parameter is used to display email of the administrator.

5) Wordpress Version : The bloginfo template tag with version parameter display the version of WordPress you are using.

C)CSS Style Sheets: CSS Style Sheets make the things all together. With your css you can move the building block structures around, make your header very long, float the sidebar left or right. The css stylesheet instruction are found under style.css file.

Monday, January 11, 2010

Introducing Wordpress Admin Panel

After you install wordpress you will have an admin panel from where you have can manage wordpress. For example if your domain name is example.com and you install wordpress in the root directory then your wordpress admin panel url will be http://example.com/wp-admin/. After you login as admin you will have Dashboard.

In this post I will discuss several wordpress sections that will make you flexible to work with wordpress.

In my wordpress 2.8 version following is the image from wordpress dashboard i.e after logging to wordpress admin panel.
wordpress dashboard

We see, within wordpress-2.8 dashboard we have several sections of,
1) Posts
2) Media
3) Links
4) Pages
5) Comments
6) Appearance
7) Plugins
8) Users
9) Tools
10)Settings.

If we expand each of the sections it will look like following image.
wordpress admin panel

The rest part of screenshot,



Now let's briefly familiarize with the each section.
1) Posts: From Posts section you can add your new blog posts, edit posts, add post tags, add categories etc. In order to manage main contents of your website you have to deal with Posts section.

2) Media: Media indicates the images, video, recordings files etc. From Media section inside wordpress, you can these upload these documents inside your blog. Media is typically uploaded and inserted into the content when writing a Post or Page. The Media Library SubPanel allows you edit, delete or view Media previously uploaded to your blog.

3) Links: From the Links section of your wordpress you can add interesting links to your site so that people can navigate those links from your blog. The Links Edit SubPanel allows you to select the Links to edit or delete. The Links Add New SubPanel handles the creation of new links. The Links Link Categories SubPanel allows you to add, edit, and delete Link Categories, as well as organize your Link Categories hierarchically.

4) Pages: The Pages section in wordpress is for adding static content to wordpress site. This is like "About Us", "Contact Us", "Company Info" information that merely changes. The Pages Edit SubPanel provides the necessary tools to edit, delete, and view existing Pages. The "Add New" Page SubPanel allows you to create new Pages.

5) Comments: In a blog comments allow users to respond to a post. Through wordpress Comments section you edit, delete and mark comments as spam. Comments that are awaiting moderation can be marked as approved or previously approved comments can be unapproved.

6) Appearance: From Appearance section in wordpress you can control how the contents of your site will be displayed. You can change the style of your site by installing, editing, activating themes. A Theme is the overall design of a site and encompasses color, graphics, and text.
From Themes subpanel you can check your current theme and available theme installed in our wordpress.

From Add New Themes subpanel you can check for themes by keyword, author, or tag. Through Feature Filter you can filter and check variable themes. You can Install and Preview themes through this subpanel and then activate themes for your wordpress.

Widgets are gadgets which allow you to add various pieces of information to your Theme's sidebar content. Just like as I add various piece of information like Recent Post, Recent Comments, Add Categories, Archives, Blogroll, to my sidebar. Through Widgets just drag widgets from widgets left pane to a sidebar on the right to activate them. If you want to deactivate them just Drag widgets back to left side from the right side.

From the Editor subpanel of the Appearance section you can edit the various files that comprise your Themes. In the Appearance section Editor SubPanel allows you to designate which theme you want to edit then displays the files in that theme. Each file (Template and CSS) in the theme can be editted in the large text box.

7)Plugins: Plugins allow users add new features to the WordPress site that don't come with the default installation.
The Plugins Installed SubPanel allows you to manage plugins that is to view the plugins you've downloaded and choose which plugins you activated on your site.
The Plugins Add New SubPanel allows you to add new plugins.
The Plugins Editor SubPanel, you can modify the source code of all your plugins.

8)Users: Whenever you install wordpress you have by default admin user.
Via "Users and Authors" you can change a assign a user to the Roles: Administrator, Editor, Author, Contributor, or Subscriber.
Via Users Add New SubPanel you can manually create user and then assign them to various roles.
From Users Your profile SubPanel name, contact info and other information can be changed.

9)Tools: Tools sections in wordpress provide you the ability to speed up WordPress for your local machine, import content from other sources, backup your content, or to upgrade your WordPress software to a new release.
The Turbo ability, adds new features to your web browser and speeds up WordPress for the local computer user.
The Press This function allows quick posting and publishing through the use of a special web browser favourite.
With Tools Import posts, comments, pages, categories, tags, and users, can be imported.

With WordPress Tools "Export" SubTool you can create an XML file to your computer. The format, which is called a WordPress eXtended RSS or WXR file, will contain your posts, comments, custom fields, categories, and tags. This Export SubTool Take note that the Exporting is a useful method to backup your WordPress data.

The Tools Upgrade SubPanel give you a easy method to upgrade.

10) Settings: The Settings section determine how your site behaves, how you interact with your site, and how the rest of the world interacts with your site.
The Settings General SubPanel allow you to change Title, tagline, blog address, admin email address, who can register to site, date and time format etc.

With the Settings Writing SubPanel, you can control the interface with which you write new posts.

With the Settings Reading SubPanel, you can decide if you want posts, or a "static" Page, displayed as your blog's front (main) page. You can also adjust how many posts are displayed on that main page.

With the Settings Discussion SubPanel allows you to control settings concerning incoming and outgoing comments, pingbacks and trackbacks.

With the Settings Media SubPanel you can determine where images, documents, and other media files will be linked to when inserted into the body of a post, specify dimension of the image.

With the Settings Privacy SubPanel you can determine whether your blog to be visible to everyone, including search engines (Google, Technorati etc).

With the Settings Permalinks SubPanel controls how that custom URL structure is defined.

With the Settings Miscellaneous SubPanel you can control the location of file uploads, uploads into month and year based folders, link tracking.

Sunday, January 10, 2010

How to install wordpress

Step 01: Download the latest version of wordpress from http://wordpress.org/download/. You will find both .zip and .tar.gz as downloadable format. Choose one of them and then unzip wordpress.

Step 02: The next step is to create a database and a user for wordpress.

You can use cpanel mysql database to create a database and mysql user and then add permission the user to use the database.

Also you can use phpmyadmin user interface to create your WordPress username and database.

Mysql client can also be used if you are comfortable to use shell or command line tool. Using mysql client,
i) Login to mysql client.
$ mysql -u root -p

ii)Create a database named wordpress.
mysql> CREATE DATABASE wordpress;

iii)Create a user name wp_userand assign privilege to use wordpress database.
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wp_user"@"localhost" IDENTIFIED BY "password";

iv) Flush the privileges
mysql> FLUSH PRIVILEGES;
mysql> EXIT

Step 03: Set up wp-config file.
You can either create and edit the wp-config.php file yourself, or you can skip this step and let WordPress try to do this itself. If you let wordpress to create you still need to provide database name, database user and password to wordpress.

If you want to manually edit the wp-config file first rename the file wp-config-sample.php to wp-config.php and then change the value of DB_NAME, DB_USER, DB_PASSWORD and DB_HOST to adapt the changes.

Step 04: Upload these file to Server.
After extracting and doing changes upload/ftp the extracted changed Wordpress file to the server in the location where you want to install wordpress. You can install on root directory or in subdirectory.

If you have shell access in your unix server hosting then you can use "wget" command to download the zip or .tar.gz file from wordpress website and then using "unzip" or "tar" tool you can extract the files. Then using "vi" editor you can edit wp-config file in server or let wordpress to create one.

Step 05: Run the Install Script.
Open the WordPress installation script by accessing wp-admin/install.php in your web browser.
If you copied WordPress files in the root directory, open http://example.com/wp-admin/install.php in your browser.

If WordPress can't find the wp-config.php file, it will tell you and offer to try to create and edit the file itself. (You can do also do this directly by loading wp-admin/setup-config.php in your web browser.)

If you want to install WordPress in a subdirectory called wpblog, open link like http://example.com/wpblog/wp-admin/install.php

GUI window will appear and fill the form as it asked. Like your blog title, email.

That's all about wordpress installation. Open your site by visiting index.php