wordpress
- Details
- Last Updated: Thursday, 03 September 2020 19:24
- Published: Sunday, 28 July 2019 20:05
- Hits: 987
wordpress:
wordpress is one of the most advanced blogging software, from which you can build almost any kind of website. Most important, it's open source, so you can see and learn how to code. It's written entirely in PHP language.
porting wordpress:
All of the wordpress files/scripts are contained within a wordpress directory, except for the database. So, when you want to migrate wordpress website from one host to another (for ex when moving from godaddy host to ipage host), it's really simple as you just need to move the whole directory and you're almost done. You still need to move the database separately, as it doesn't reside in the wordpress dir. Once you have moved the database, you will need to modify wp-config.php file in the top level wordpress dir to point to the new database. This is needed as the database location has changed. Change these values in wp-config.php file:
1. define('DB_NAME', 'new_db_name'); => If you kept new database name the same, there's nothing to modify.
2. define('DB_USER', 'new_db_user'); => If you kept new database user name the same, there's nothing to modify.
3. define('DB_PASSWORD', 'new_password'); => enter your new password here.
4. define('DB_HOST', 'name.dbxx.x.abc.com'); => Critical that you modify the sql hostname to match the new host name. You can get the new database hostname from the web hosting provider. Another way to find this
At this point, we are done, migrating wordpress. A very good tutorial on this is HERE .
wordpress structure:
In order to understand basic structure of wordpress, I've listed main dir and files:
1. WEB-INF dir:
2. wp-admin dir:
3. wp-content dir:
4. wp-includes dir:
5. Numerous php files:
index.php is the first file that is accessed in the wordpress dir whenever a visitor visits the website. If you recall, index.php or index.html are the default files that the browser looks for when the url is typed (www.abc.com), with no files specified in the url (www.abc.com is equivalent to www.abc.com/index.html or www.abc.com/index.php).
Theme:
I have used default "Twenty Ten" theme. It's named Twenty Ten, since it was released in year 2010. Every year a new theme is released by Wordpress team named after that year. Currently for year 2020, we have "Twenty Twenty" as the theme.
The very first thing you might want to do is to customize the appearance of this theme. This can be done by going to administrator panel, and choosing Appearance tab on left side. Then click on Themes.
Your current active theme shows up. Click "Customize" on it. A new screen shows up. Click on "Header Image", then "Add new image" and upload your new image. Don't worry about the dimensions of the image, as the menu will allow you to crop the size of this new image to fit on your website. Once Published, the new image will show up on the top bar of your website.
You can further customize what gets placed on what side of page via "widgets". Instead of clicking on "Themes", click on "Widgets" on Appearance tab. You will see lot of widgets for images, archives, calender, etc. You can choose your desired widegts and drop them on right side to wherever you want them to be placed. I placed my pictures and search box, this way, on right side of page.
One good way to learn about themes is to create one yourself from scratch:
good tutorial here: http://webdesignerwall.com/tutorials/building-custom-wordpress-theme