拖了一个月终于着手并且完成了。其实没有什么难的。但是因为我对Linux的了解非常局限,还是花了一番功夫,同时学了很多东西,在这里记一下。没有试图写一篇“手把手教你搬WP”,只是记录一些我觉得有帮助的东西,希望做同样的事情的且同样不是那么牛逼的Linux学习者们有用:)
虽说是WordPress搬家,但是任何一个小型网站搬家都差不多这样了吧,嘿嘿。
如果用cPanel和MySQLAdmin之类的东西可能就很傻瓜,但是第一cPanel太贵了(竟然要425多刀一年,我都笑了),第二VPS都买了必须必须要抓住每一个学Linux的机会啊。
过程如下(断断续续弄了好几天…):
环境
虚拟主机和VPS都是host2ez的,最牛逼的主机提供商。系统是CentOS Linux 5.6,apache(现在改名叫httpd)已经装好了,再装
yum php mysql mysql-server
就成。
文件
这个简单,cPanel把虚拟主机上文件打包,VPS上wget下来就好。WP的独立性做的好,文件路径改变不会有什么问题。备份用的插件BackUpWordpress倒因为出问题了,不能识别路径,我直接禁用掉了,VPS嘛马上弄个备份方案还不容易,不需要用WP的插件了。在[wordpress path]/wp_config.php里把信息改一下,数据库部分的怎么改见下面。
数据库
对数据库命令不了解的同学建议先看一下mysql的教程。我不能把所有操作都写出来…这次弄这个还学了不少数据库的东西…tutorial很容易搜到,我觉得有一个比较好的命令列表点 这里,里面包括了所有常用的命令。
在虚拟主机的cPanel – mysqladmin里备份出.sql文件,传上VPS,导入文件的命令是
mysql – u user_name -p database_name < file_name.sql
很多地方写的-p后面跟密码,我用的版本-p后面不跟东西,回车以后才提示输密码,可能是新版本不提倡显式输入密码了吧。非要用的话就–password=”xxxxxx”
如果你导出文件选的是整个mysql,需要打开文件把database”information_schema”部分删掉,否则会失败,这个db貌似是mysql自己的,不能改..不懂
之后要建立一个用户并给此用户分配使用相应db的权限,虽然我们也可以直接把root用户写进wp_config.php但是稍微有点安全意识的程序员都不会想要这么做的…虽然权限没什么大不了的,但是名字叫root就是不行! 所以进数据库:
mysql -u root -p
进去以后添加用户:
mysql> create user 'username'@'localhost' identified by 'mypass';
分配权限:
mysql> grant all privileges on databasename.* to username@localhost; mysql> flush privileges;
然后就把这个用户甩给Wordpress啦(编辑wp_config.php)
测试的时候有一些问题
上面完了就能http进vps的ip看到博客了,但是不要去点任何东西…因为数据库里“本站”的地址还是原来的域名,这样如果你原来的网站还开着那么随便点个链接就进到原来网站了,如果没开那就can’t find page啦。
而且因为没法进后台改,所以只好进mysql改了
mysql> use viaxlcom_viaxlcom; mysql> select * from wp_options where option_value rlike "^http"; +-----------+---------+-------------+----------------------------+----------+| option_id | blog_id | option_name | option_value | autoload | +-----------+---------+-------------+----------------------------+----------+ | 2 | 0 | siteurl | http://axlarts.com/blog | yes | | 39 | 0 | home | http://axlarts.com | yes | | 41 | 0 | ping_sites | http://rpc.pingomatic.com/ | yes | +-----------+---------+-------------+----------------------------+----------+ 3 rows in set (0.06 sec) update wp_options set option_value="http://12.34.56.78/blog" where option_id=2; update wp_options set option_value="http://12.34.56.78" where option_id=39;
这样就把VPS上的网站地址改成本身的IP了。
————————————-
另外我发现一些插件会出现权限问题,比如JW player(放flv视频用的插件),没法启用插件因为提示不能写目录,我整个www目录都是755权限,设置成777以后可以开启了,然后再弄回来。这个问题解决了但是原因一直不知道,直到我因为另一个问题搜了一下才搞明白。
另一个问题是:更新插件update的时候会提示我输入ftp帐号,以前没这事啊,于是我就去装了个vsftpd(ftp的服务端),设置好能更新了,但是为什么?后来搜到这篇文章 <Auto Update WordPress Without FTP> 解决了ftp的问题并且意识到上面的问题也和这个有关系,即因为目录的owner不是httpd,所以网站脚本没有对文件操作的权限。
/var/www目录的owner要设置成httpd的运行者(可以用ps aux或者top命令查看),可能是www,apache或者nobody或者其他的。我的是apache,所以在chown apache:apache /var/www -R之后update就不用输ftp了,我立刻关了vsftpd依然ok,可见之前是绕了弯子了,没权限还用ftp操作文件…
绑域名
进godaddy面板直接改A地址就好了,没有别的要操作的。
但是因为我本来虚拟主机上就放了两个网站,所以怎么在一个VPS上绑定多个域名多个网站?之前用cPanel是傻瓜操作,没有怎么弄?这个我也弄了好半天最终解决了,马上再写一篇单独说吧
好啦好啦,到此结束,路人有问题可以在下面留言~
Now adding this to a short list of sites I would defend in a conversation about the modern web, and a look at learnandadvancegrowth reinforced that defence list, the few sites that serve as evidence the web can still produce good things are precious and this one has clearly joined that small list of exemplary sites.
Glad I gave this fifteen minutes rather than the usual three minute skim, and a look at seoripple earned the same investment, time spent on quality content is rarely wasted but the reverse is also true and learning which sites deserve which kind of attention is part of being a careful online reader.
Honestly the simplicity of the explanation made the topic click for me in a way other writeups had not, and a look at learnandadvancepath continued that clarity into related areas, when a writer gets the level of explanation right the reader does the heavy lifting themselves and the post just enables it.
Если интересует эта тема, вот прямая ссылка. Сам долго ковырялся, делюсь полезной ссылкой: мелбет казино скачать на андроид.
Этот букмекер радует удобным интерфейсом, линия на футбол и теннис огромная. Там еще есть нормальные live-ставки.
Для новых пользователей активируется стартовый фрибет, лишним точно не будет. Кто уже ставил там?
Held my interest from the opening line through to the closing thought, and a stop at discoverfreshopportunities did the same, content that earns sustained attention in an environment full of distractions is doing something right and this site is clearly doing several things right rather than just one or two which I really appreciate.
узнать айпи по номеру телефона http://www.kak-najti-cheloveka-po-nomeru-telefona-2.ru
Приветствую всех. Тема здоровья всегда на первом месте, так как в сети сейчас полно сомнительных клиник. Когда нужен проверенный и опытный врач для капельницы, лучше сразу обращаться к сертифицированным медикам.
Сам долго изучал отзывы и искал надежный вариант, и в итоге нашли клинику, где врачи работают профессионально. Кому тоже нужны подробности и условия, советую посмотреть официальный источник: подробнее тут.
Врачи дежурят круглосуточно во всех районах, реагируют очень быстро, буквально за час. Не теряйте время, поможет вовремя принять правильные меры. Пусть все будет хорошо!
Приветствую всех. Слушайте, вопрос сложный, но многим может помочь, так как в сети сейчас полно сомнительных клиник. Если ищете анонимного специалиста с быстрым выездом по городу, то не рискуйте и не доверяйте случайным объявлениям.
Мы в свое время тоже столкнулись с этой бедой, чтобы помощь оказали без лишних хлопот и в спокойной атмосфере. Чтобы узнать точные цены и вызвать специалиста, можете ознакомиться по ссылке: подробнее тут.
На этом сайте действительно дана полная информация, реагируют очень быстро, буквально за час. Главное — не затягивать в такие моменты, кому-то тоже пригодится и спасет здоровье. Всем душевного спокойствия!
Liked the post enough to read it twice and the second read found new things, and a stop at createprogressframework similarly rewarded the second look, content with hidden depths that only reveal themselves on careful rereading is the rare kind that earns lasting respect rather than fleeting first impressions only briefly held.
Worth your time, that is the simplest endorsement I can give, and a stop at findyourstrongdirection extends that endorsement across the rest of the site, this is one of those increasingly rare places that delivers on what it promises rather than over selling the content and under delivering on substance every time which I find frustrating elsewhere.
Reading the writers other posts after this one suggests the quality is consistent rather than peak, and a stop at isebrook confirmed the consistent quality reading, sites that hold the same level across many pieces rather than peaking on a few are sites with sustainable editorial discipline and this one has clearly developed that.
Quietly the post solved something I had been turning over without quite knowing how to phrase the question, and a look at startmovingstrategicallynow extended that quiet solving, content that addresses unformulated needs is content with reader insight and this site has demonstrated that insight at a high rate across the pieces I have read recently.
melbet melbet
Closed several other tabs to focus on this one as I read, and a stop at growwithsteadyintent held my undivided attention the same way, content that earns full focus in an attention environment full of competing pulls is content doing something genuinely well and the team behind it deserves recognition for that achievement consistently.
вывод из запоя в стационаре вывод из запоя в стационаре
Worth flagging this post as worth a careful read rather than a casual skim, and a stop at createimpactplanningframework earned the same careful approach, the few sites that warrant slower reading are sites I now treat differently from the daily content stream and this one has clearly moved into that elevated treatment category.
Came away with a slightly better mental model of the topic than I started with, and a stop at learnandadvancepath sharpened that further, content that improves the reader thinking apparatus rather than just dumping facts into it is the rare kind I genuinely value and seek out when I have time to read carefully.
Speaking as someone who used to recommend blogs frequently and got out of the habit this site is rekindling that impulse, and a look at learnandadvancegrowth extended the rekindling, the recovery of an old habit triggered by encountering work that justifies it is itself a small kind of pleasure and this site is providing that recovery experience.
A relief to read something where I did not have to fact check every claim mentally, and a look at jedbroom continued that reliable feeling, sites where I can lower my guard and trust the content are rare and this one is earning that trust paragraph by paragraph through consistent careful work behind the scenes.
вывести из запоя в больнице вывести из запоя в больнице
melbet melbet
Will share this on a forum I am part of where it will be appreciated by others working in the same area, and a look at learnandexecuteclearly suggests there is more here worth passing along too, definitely a generous resource that deserves a wider audience than it probably has today across the open internet.
A piece that did exactly what it promised in the headline without overshooting or underdelivering, and a look at findnewopportunityroutes continued that calibration, alignment between promise and delivery is a basic editorial virtue that many sites fail at and this site has clearly mastered the matching of expectation and substance throughout pieces.
I really like how the writer keeps the tone friendly without sounding fake or overly polished, and after a stop at growwithintentionalsteps the same calm pace was there, no rushing to make a point and no padding either, just clean honest writing that I can respect and come back to later again.
Solid post, the structure is easy to follow and the language stays simple even when the topic gets a bit more involved, and a look at exploreuntappedpotential kept that same standard going, so I left feeling like the time spent here was actually worth something for once which is rare lately.
Felt the writer did the homework before publishing, the references hold up, and a look at createprogressplanning continued that documented care, content with traceable claims rather than vague assertions is the kind I trust and the lack of bald assertion in this post is one of its quietly impressive qualities for me.
Now thinking the topic is more interesting than I had given it credit for, and a stop at startyourjourneynow continued that elevated interest, content that revives my curiosity about subjects I had set aside is doing genuine work in the structure of my interests and this site is providing that revivifying effect today actually.
A memorable post for me on a topic I had thought I was tired of, and a look at seoripple suggested the same site can refresh other tired topics, sites that can revive my interest in subjects I had written off as exhausted are doing rare work and this one is clearly doing that for me today.
Felt mildly happier after reading, which sounds silly but is true, and a look at findyourstrongdirection extended that small mood lift, content that improves rather than degrades my mental state is content I want more of and the cumulative effect of reading sites that lift versus sites that drag is real over time.
A welcome contrast to the loud takes that have dominated my feed lately, and a look at startmovingstrategicallynow extended that calm voice, content that arrives without yelling has become unusual in the modern attention economy and this site is one of the few places I have found that consistently delivers without raising its voice.
Speaking as someone who used to recommend blogs frequently and got out of the habit this site is rekindling that impulse, and a look at createbetterpaths extended the rekindling, the recovery of an old habit triggered by encountering work that justifies it is itself a small kind of pleasure and this site is providing that recovery experience.
Took my time with this rather than rushing because the writing rewards attention, and after unlockcreativepaths I had even more to absorb, the kind of content that pays back the patient reader rather than punishing them with empty filler is something I look for and rarely find in regular searches lately.
Bookmark earned and folder updated to track this site separately, and a look at seohive confirmed the folder upgrade was the right call, organising my reading list so that good sites do not get lost in a sea of casual bookmarks is something I do more carefully now and this site warranted its own spot.
запой стационар цены запой стационар цены
вывод из запоя в стационаре вывод из запоя в стационаре
Now appreciating that the post left me with enough to say in a follow up conversation, and a look at discoverforwardmomentumnow added more material for those follow ups, content that prepares me for related conversations rather than just informing me alone is content with social utility and this site provides that social armament reliably for me.
скачать melbet скачать melbet
Я изначально скептически относился ко всей этой дистанционке. Думал, сын просто будет играть в танчики. Но жена настояла, нашли один портал с живыми учителями: источник . Фишка в том, что можно спокойно закрыть программу без нервов и репетиторов по вечерам. Техподдержка отвечает быстро. Платформа не виснет на вебинарах, что для меня было критично. Короче, кому надоело возить чадо через весь город под дождем – заглядывайте.
Started thinking about my own writing differently after reading, and a look at discovernewfocus continued that reflective effect, content that influences how I work rather than just informing what I know is content with the highest kind of impact and this site has triggered some of that reflective influence today on me.
Held my interest from the opening line through to the closing thought, and a stop at grovefarms did the same, content that earns sustained attention in an environment full of distractions is doing something right and this site is clearly doing several things right rather than just one or two which I really appreciate.
Чтобы быстро и эффективно подробнее тут, воспользуйтесь специализированными сервисами.
Слушай, тут главное — без глупостей.
Через личный контакт можно получить явное согласие на передачу деталей.
Да, и ещё момент — без фанатизма.
Probably the kind of site that should be more widely read than it appears to be, and a look at growwithintentionalsteps reinforced that quiet wish, the gap between a sites quality and its apparent reach is sometimes large and that gap exists for this site in a way that makes me want to mention it more.
Thank you for the genuine effort here, it shows in every paragraph and not just the headline, and after my visit to findnewopportunityroutes I was sure this site cares about getting things right rather than chasing clicks, which is the main reason I will come back later this week to read more.
Stands out for actually being useful instead of just being long, and a look at createimpactplanningframework kept that going, length without value is the default mode of most blogs these days but this site has clearly chosen a different path which I respect a lot as a reader who values careful editing decisions like that.
Skipped the social share buttons but might come back to actually use one later, and a stop at exploreuntappedpotential extended that share urge, content that triggers genuine sharing impulses rather than performative ones is content that has actually moved me and not many posts in a typical week do that for me actually.
Came away with a small but real shift in perspective on the topic, and a stop at createprogressplanning pushed that shift a bit further, the kind of subtle reframing that good writing does to a reader without making a big deal of it is something I always appreciate when it happens which is sadly not that often.
анонимная наркологическая помощь на дому анонимная наркологическая помощь на дому
Glad I stumbled across this post, the explanations actually make sense without needing background knowledge to follow along, and after a stop at learnandaccelerategrowthpath the same was true there, no assumptions about the reader just clear writing that anyone can understand from the first line right through to the end.
Honestly enjoyed every minute spent here, that is not something I say lightly, and a look at discovercreativegrowth confirmed I will be back, the bar for spending time online is high for me these days but this site clears it without effort which is high praise indeed from this reader who is usually rather demanding.
Liked the way the post got out of its own way, and a stop at jedbroom extended that invisible craft, the best writing you barely notice while reading because it is doing its work without drawing attention to itself and this site has clearly mastered that disappearing act across the pieces I have read.