Wordpress category
Getting going with WordPress
- Copy gz to directory of website
- extract to create wordpress folder
- use the 5 minute start guide (see below)
- create new database in mysql SITE_WordPress
- run install using the website address. http://www.sitedomain.com/wordpress/wp-admin/install.php
- copy themes and plugins from other base system : eflowone
- change settings:permalink
- activate plugins: exec_php,
Here’s the quick version of the instructions, for those that are already comfortable with performing such installations. More detailed instructions follow.
- Download and unzip the WordPress package, if you haven’t already.
- Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.
- Rename the wp-config-sample.php file to wp-config.php.
- Open wp-config.php in your favorite text editor and fill in your database details as explained in Editing wp-config.php to generate and use your secret key password.
- Place the WordPress files in the desired location on your web server:
- If you want to integrate WordPress into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server.
- If you want to have your WordPress installation in its own subdirectory on your web site (e.g. http://example.com/blog/), rename the directory wordpress to the name you’d like the subdirectory to have and move or upload it to your web server. For example if you want the WordPress installation in a subdirectory called “blog”, you should rename the directory called “wordpress” to “blog” and upload it to the root directory of your web server.Hint: If your FTP transfer is too slow read how to avoid FTPing at : Step 1: Download and Extract.
- Run the WordPress installation script by accessing wp-admin/install.php in your favorite web browser.
- If you installed WordPress in the root directory, you should visit: http://example.com/wp-admin/install.php
- If you installed WordPress in its own subdirectory called blog, for example, you should visit: http://example.com/blog/wp-admin/install.php
That’s it! WordPress should now be installed.
Integrating WordPress into an existing site
After playing around with WordPress a bit. I wanted to see if I could intergrate wordpress into one of my existing websites. After searching around a bit, I found the following blog entry.
http://moshublog.com/2005/07/05/integrate/
I will update this entry soon to let you know how it turned out.
Securing your WordPress installation
Found this nice article on securing your wordpress installation, http://codex.wordpress.org/Hardening_WordPress.
The chmod command it used to change the permissions of files and directories. It should be noted that directories and files need different types of permisssions. For instance, directories need the x (execute) permision to be able to list files and yence for your wordpress to run.
For the most secure installation, make your permissions very restrictive and open them up as necessary.
In general, you should be the owner of your files and directories and be able to read, write and execute, rwx or 7. The group assigned to the files and folders should be the group that is running the apache web service. For the default CentOS installation, this group is apache. For the group chmod setting, directories should be set to r-x (5)and files should be r– (4). To get all the functionality out of wordpress, you may have to loosen that a bit, but it is a good starting point. See the article mentioned above for more information.
Ok, so here comes the tricky part. How do you get directories to be one type of permission and files to be another type of permission. The -R option for chmod will apply the setting to all files and folders recursively and this is not exactly what we want. So we need to do this in multiple steps.
- cd (change directory) to the directory where wordpress is installed.
- Use the chmod command with the -R recursive flag to change all directories and files to a value of 750. This will give the owner, you, full permissions, it will give the group, apache, write and execute permissions (note, we will remove the execute on files in the next step), and is give no permissions to anyone else.
- chmod -R 750 wordpress
- Next we use a little gem of code I found on the net to change all the files ONLY to a new chmod value.
- find . -type f -exec chmod 640{} \;
- This finds all the files starting in the current directory and executes the chmod 640 on them.
- There you have it. Now we have 750 protection on directories and 640 on files. The next step would be to set permissions on individual files on a case by case basis to support additional wordpress functionality. Note, you should always turn the permissions back when you are done using the functionality.
Getting Going with WordPress
- Copy gz to directory of website
- extract to create wordpress folder
- use the 5 minute start guide (see below)
- create new database in mysql SITE_WordPress
- run install using the website address. http://www.sitedomain.com/wordpress/wp-admin/install.php
- copy themes and plugins from other base system : eflowone
- change settings:permalink
- activate plugins: exec_php,
Here’s the quick version of the instructions, for those that are already comfortable with performing such installations. More detailed instructions follow.
- Download and unzip the WordPress package, if you haven’t already.
- Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.
- Rename the wp-config-sample.php file to wp-config.php.
- Open wp-config.php in your favorite text editor and fill in your database details as explained in Editing wp-config.php to generate and use your secret key password.
- Place the WordPress files in the desired location on your web server:
- If you want to integrate WordPress into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress directory (but excluding the directory itself) into the root directory of your web server.
- If you want to have your WordPress installation in its own subdirectory on your web site (e.g. http://example.com/blog/), rename the directory wordpress to the name you’d like the subdirectory to have and move or upload it to your web server. For example if you want the WordPress installation in a subdirectory called “blog”, you should rename the directory called “wordpress” to “blog” and upload it to the root directory of your web server.Hint: If your FTP transfer is too slow read how to avoid FTPing at : Step 1: Download and Extract.
- Run the WordPress installation script by accessing wp-admin/install.php in your favorite web browser.
- If you installed WordPress in the root directory, you should visit: http://example.com/wp-admin/install.php
- If you installed WordPress in its own subdirectory called blog, for example, you should visit: http://example.com/blog/wp-admin/install.php
That’s it! WordPress should now be installed.
Creating a new Website with Wordpress on an Apache Webserver
One of the things I like best ablout wordpress is that is allows you to quickly and easily get a professional looking website up and running in a flash. Creating multiple websites with Wordpress is a snap.
To create a new site or test site, do the following:
- Create a New CName record with your Registar. Make sure there is a CName record for your domain with your registar (ie, GoDaddy, etc). The CName used for a website is typically www but it can be pretty much anything else as well. For a test site, you may wish to have a CName record of test. You would then get to your test site by using http://test.yourdomain.com. This CName record would typically point to your main IP address. For GoDaddy the default to reference this AREcord is the @ symbol. The A record typically contains the IP address of the computer that hosts yoru site.
- Edit your httpd.conf file to point to a new location. Now that you have a CName record point to your IP address, you need to make sure that your web server know what to do when someone hits test.mydomain.com. By default, it will probably take you to the same default web site. On a CentOS installation, this would the index page that is located in the /var/www/html directory. However, we want a new site, so we need to tell the system to go to a new location for different webpages. You do this by editting the httpd.conf file and adding a Virtual Host Directive.
<VirtualHost *:80>
DocumentRoot /var/www/test.mydomain
ServerName test.mydomain.com
</VirtualHost>.
If you are hosting multiple site, you may wish to separate these VirtualHost directives into files in a sites folder in the httpd folder and then include them in the httpd.conf file using the Include sites/test.mydomain.site line.
After making these changes, you must restart your httpd service. Now test.mydomain.com is point to the right location. Now we add the wordpress site.
- Unzip the wordpress gz file in the new test.mydomain folder located in /var/www/ folder.
- If you have themes and plugins that you typically use, you can copy and paste them from the /wordpress/wp-contents folders to you new folder.
- Create a new mysql database for this instance of wordpress. Typically for multiple site, something like XXX_wordpress works well where XXX is the name of the site.
- Edit the wordpress/wp-config-sample.php file and enter in the database information and save file as wp-config.php
- Run http://test.mydomain.com/wordpress/wp-admin/install.php, this will use the config file and create the tables and install wordpress. It will also give you and admin password. Be sure to record the password.
- Login into the system using http://test.mydomain.com/wordpress/wp-admin/. There you can get going with the final settings. If you copied themes and plugins, you may wish to activate them.
- Change the settings so that http://test.mydomain.com will open the blog instead of having to using the /wordpress extension. This is done by going to the admin|settings|general page and changing the Blog address to http://test.mydomain.com.
- Copy the index.php and .htaccess file fro mthe wordpress directory to the root directory of your site (Blog address)
- Edit the index.php file so that the wp-blog-header.php points to the directory above. ./wordpress/wp-blog-header.php.
- Check out Giving WordPress Its Own Directory for more valuable info.
- Now you are good to go with a brand new website. Enjoy…