Posts with the tag 'WordPress'
原来的主机空间使用的是Godaddy提供的免费空间(在Godaddy注册域名后,会免费提供一个主机空间,使用时网页上方会附带广告),要搬家的新空间也是在Godaddy上买的。另外原先用的wordpress系统是2.6.3版本,这次想换到最新的2.7.1上。博客搬家过程中遇到的一些问题和注意事项在这里简单介绍一下。
1.数据的备份:一方面是数据库的备份另一个是程序及上传文件的备份。前者可以通过PhpMyAdmin的导出功能,把所有的数据库表都导出并保存到一个SQL的文件中。这其中包括建立数据库和数据表,因为我是在新主机空间中重新安装wordpress2.7.1,所以建立数据库和数据表的语句可以不需要,只导出数据即可。程序和上传文件的备份可以直接用FTP把原主机中的数据下载到本地备份,再上传到新主机。比较重要的当然是upload文件夹下上传的一些数据比如图片等,还有对主题文件的一些改动。
2.域名解析转换:把最新的wordpress程序上传到新的主机空间后,是无法根据主机的IP地址访问,因为同一个IP是由在这个主机上的多个域名共享的,只能通过域名访问。这时候需要在新的主机空间下增加你的博客域名,但前提是从以前的主机空间中把这个域名先删除。由于Godaddy的免费空间中只有现有的域名starryshen.com且是主域名(primary domain)。主域名是无法删除的,必须改变主域名或者删掉整个主机空间,最后还是先删掉整个免费主机空间才能在新空间下添加这个域名。在新的主机空间下成功添加域名后,接下来要到域名管理系统中修改ARecord到新的主机IP。因为主机空间都属于Godaddy,所以就不需要修改DNS了。
基本上完成上面的步骤,然后就可以安装最新的wordpress程序了,再把必需的文件通过FTP上传,并通过PhpMyAdmin导入SQL数据库文件基本搞定了。导入数据库的时候可能会根据现有的数据做一些记录的删除。如果访问主页出现空白,可能是你的主题文件还没有上传。
大体就是这些吧,如果你不用重新安装wordpress程序,可能有些问题就不会出现了,估计会更简单了!
Tags: WordPress
June 7th, 2009
sigh, 一个多月前就说博客要换主机空间了,到今天算是基本差不多了。多多感谢Yang同学友情提供主机空间,并不遗余力的帮俺搞定很多问题(以后有机会的话顺带写下来)。
更新到wordpress 2.7.1, 换了个新的主题Blixed,搞定了Feed输出,……还有不少在后面等着呢。
恩,算是本博客一个新的milestone。 (希望项目的最后两个milestone也能顺利的通过,然后夏天我就可以休假了。)
Tags: WordPress
June 4th, 2009
周末看到博客上的Godaddy的广告实在是无法忍受了。以前还是注册域名相关,现在好像都变成交友啥乱七八糟的了,真有寄人篱下之感。还有就是导致浏览速度很慢。正好前不久有个朋友刚买了个独立空间,看来是该搬过去好好休整休整了。
期待能有新的面目,也希望这件事能尽快圆满的完成。
Tags: WordPress
May 4th, 2009
一直以来都没有办法利用Feedsky和FeedBurner托管本博客的Feed,所以也没办法加上订阅博客的图标方便大家订阅, 对于习惯用Rss Reader工具来看博客的人来说可能比较麻烦。好象是Godaddy免费空间的问题,广告代码无法通过XML Validation验证.
不过其实可以直接利用http://www.starryshen.com/feed这个地址来订阅。用Google Reader,有道阅读直接订阅这个地址都可以,我估计别的阅读器应该也没问题(不行的话估计就比较烂了,呵呵)。
另外如果你经常光顾豆瓣,并有豆瓣账户的话也可以在这儿浏览我的博客。
写完以上这些我莫名觉得自己有点土!Sigh.
Tags: WordPress
March 9th, 2009
If you write some HTML or PHP script into your wordpress post, it will interprated by the wordpress system and will not show the code content.
There is wordpress plugin called Preserve Code Formatting can help you to show the code in the post. After download the plugin and activate it, you can add the code what you want to show between or
tag.
It can work both in post and comment, you can see the result in my last post's comments.
Tags: WordPress
March 5th, 2009
At the first time of starting this blog, I want to paly audio such as music like this in the web page. But I am not very clear how to do it. I would like to thanks SongPower’s help for this firstly.
Actually there is a wordpress plugin audioplayer to add audio palying in a post, but this plugin only support MP3 format. Now we can embed most popular audio into web page not only MP3 format. You can do it using HTML <embed> or <object> element. embed is not a standard HTML and XHTML element, so it’s better to use object element.
If you want the audio files are played by windows media player both in IE and FireFox browser, you should set the type arrtibute as “type = application/x-mplayer2″. For more detail information you can check the source code of my post “丽江纳西民歌“。
Tags: WordPress
February 28th, 2009
今天在Google的WebMaster博客上看到一篇文章:SEO建议,如何获取链接。 其中介绍如何让网站获取导入链接的一些方法或者说是思路,比如网站提供一些服务,而这些服务对用户是有帮助的,提供有价值的信息等等。其实核心还是提供对用户有用或感兴趣的内容,这样才会有更多的人关注你的网站进而得到更多的导入链接。
回头看看自己的博客,虽然没有刻意去追求SEO,但还是希望能有更多的人知道这个小角度,赫赫。基本上我还是以内容建设为主,但我提供的这些内容是不是有人愿意看就很难说了,毕竟基本上都是自己个人感兴趣的。其实有时候以一个浏览者的心态去思考,或者注意自己在看其他博客时的行为也能了解哪种网站结构是用户习惯的,哪些内容对用户是有价值的。
像我喜欢看《开卷八分钟》,把每期节目在博客里收录下来,我想和我有共同爱好的人如果来这每天看开卷应该就会很方便了。写了几篇怎么做家常菜的,虽然都不专业都如果有不会做的,应该也是很有帮助的吧。我的“白菜炖排骨”就从搜索引擎带来了不少流量。其他的都是自己旅行的一些照片,可能就比较私人化些吧。
不管怎样,要提高流量,获得导入链接,思路应该是相通的,就是你的网站内容对浏览者是有价值的。当然制作的出发点可能不一样 ,有的单纯为流量,PR;而有的只为自己喜欢的,虽然难免小众些,但有时候价值可能会更高也不一定。
Tags: WordPress
February 28th, 2009
Show most viewed or popular posts in your wordpress blog is quite good. It can let viewer stay more time to watch your blog and clear what’s most popular in your site.
Wordpress most viwed posts in sidbar discribe how to do. It will use wordpress plugin, one is wp-postviews and another is ExecPHP. wp-postviews plugin can count the view number of every post and ExecPHP can execute php code in widget.
Defautly it will show view count after the post title in sidbar. If you don’t want to show the view count you can change as following:
Go to Wordpress console - Settings - Post Views, then change the most view templete. Delete the showing view count code.
Tags: WordPress
February 21st, 2009
robots.txt is quite useful for your website when search engine robot(or spider) crawl through your website. It can tell the robot that which content or website you don’t need to crawl. Why do we need to do this for search enginee?
Firstly, for some content in your website maybe it’s unuseful to viewer and never change. such as in wordpress blog the login page. on the other hand, some website maybe duplicated. If search engine crawl much duplicated content in your blog, it is bad to upgrade your page rank. At last, search engine robot crawl less content, the less network bandwidth used by search engine. So all of these reasons make sense to have a robots.txt in your blog.
robots.txt is a TXT file with ASCII coding. After writing it, you should put it in the root of your website server( the same place with sitemap.xml), you can visit with http://www.example.com/robots.txt. For a simple robots.txt there are two rules:
‘user-agent:’ this means the rule is applied for what search engine robots. the ‘*’ means that applying for all ones. This is a list of all existing search engine robots. ‘Disallow’ means which website you don’t want crawl.
My wordpress blog robots.txt is as following:
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/themes/
Disallow: /trackback
Disallow: /feed
Disallow: /comments
Disallow: */trackback
Disallow: */feed
Disallow: */comments
Allow: /wp-content/uploads/
Sitemap: http://www.starryshen.com/sitemap.xml
The robots.txt apply for all robots. And disallow robots to crawl wordpress system folder such ‘wp-admin’, ‘include’ , plugin and theme folder. Disallow robots to crawl all posts’ comments , feed and trackback. Allow robots to crwal ‘ uploads’ folder because the image what I upload is in this folder.
The last line is your blog’s sitemap file.
Tags: WordPress
February 19th, 2009
In the last post, I spend about one hour to search how to add file download function in a wordpress post or page. Fortunately finally I find a video here to describe how to do it.
This mthod can work both in wordpress post and page, and file format can be PDF, DOC or zip file. You can try more to test it . Actually I try to add downloading a .txt file in my last post, but finally it fail. I don’t know why. Probablly the content of my txt is chinese and my IE browser is english version.
Anyway, I archive the txt file into a zip file and then it works well. so next time if you can’t download some format of file using this method, you can also archive the file into zip file firstly.
Tags: WordPress
January 24th, 2009
Older Posts