拖了一个月终于着手并且完成了。其实没有什么难的。但是因为我对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是傻瓜操作,没有怎么弄?这个我也弄了好半天最终解决了,马上再写一篇单独说吧
好啦好啦,到此结束,路人有问题可以在下面留言~
Worth saying that the writing carries a particular kind of authority without making any explicit claims to it, and a stop at cancelleda extended that earned authority feeling, sites that demonstrate expertise through the quality of their explanations rather than by stating credentials are sites I trust most and this site has it.
mostbet sənəd təsdiqi https://mostbet02606.online/
Just sat back at the end of the post and felt grateful that someone took the time to write it, and a look at burkinaa extended that gratitude across more of the site, recognising effort behind quality work is part of what makes the open web a community rather than just a marketplace today.
Considered alongside other sources I have been reading this one consistently rises to the top, and a stop at intentionalpathway maintained that top ranking, the informal ongoing comparison between sources is something I do whenever reading on a topic and this site keeps coming out near the top of those comparisons over many sessions.
mostbet email gəlmir http://mostbet02606.online
Alright, last one I swear — but someone’s gotta warn people about this Miami rental mess. You spot this killer offer online — brand new Porsche, zero excess, price that screams “book me”. Plus they freeze $5500 on your card and say “it’ll drop off in two weeks”. Fool me twenty times? That’s just called Tuesday in the 305. miami luxury car rental. anyone who’s tried public transport here knows I’m not joking. leather seats that won’t weld to your legs in July. I’ve tested so many rental companies across Dade, Broward, and Palm Beach. Finally found one outfit that actually keeps its word. prices change hourly so don’t wait around:
car rentals in miami florida https://luxury-car-rental-miami-20.com also bring polarized shades unless you enjoy driving into the sun like a zombie. Anyway glad there’s at least one honest operator left in this town.
Alright, last one I swear — but someone’s gotta warn people about this Miami rental mess. Then you actually go to pick up the car. Plus they freeze $5500 on your card and say “it’ll drop off in two weeks”. Fool me twenty times? That’s just called Tuesday in the 305. luxury car rental in miami. anyone who’s tried public transport here knows I’m not joking. South Beach dinner, Design District shopping, or a spontaneous Keys adventure — AC must be arctic and unlimited miles non-negotiable. I’ve tested so many rental companies across Dade, Broward, and Palm Beach. Finally found one outfit that actually keeps its word. Here’s the only straight shooter for premium rides across South Florida
car rental in miami florida https://luxury-car-rental-miami-20.com also bring polarized shades unless you enjoy driving into the sun like a zombie. drive safe and absolutely skip that “windshield protection” upsell — pure profit for them, zero for you.
Reading more of the archives is now on my plan for the weekend, and a stop at americadepartment confirmed the archive worth the time, the rare archive worth a dedicated reading session rather than just casual sampling is the rare archive of serious work and this site has clearly produced enough of that work to warrant the deeper exploration.
The whole experience of reading this was pleasant from start to finish, no pop ups and no annoying interruptions, and a look at ifollowers continued that clean experience, technical choices about page design matter for the reader and this site clearly cares about the small details that add up to comfort across multiple visits.
mostbet mines коэффициенты mostbet mines коэффициенты
mostbet telefonu necə dəyişmək olar http://mostbet02606.online
1win ставки https://1win75197.online/
мостбет карта вывод мостбет карта вывод
мостбет ҳисоб бо TJS http://mostbet33044.online
melbet казино регистрация melbet казино регистрация
hogyan lehet telepíteni a mostbet appot androidra hogyan lehet telepíteni a mostbet appot androidra
Solid stuff, the kind of post that I will probably refer back to later this month when the topic comes up again, and a look at billyboya only confirmed I should bookmark the site as a whole rather than just this single page for future reference and use across coming weeks.
Okay folks gather round — another Miami rental horror story coming at you. Then you actually drive to the rental lot. Completely different car sitting there — scratches everywhere, smells like someone hotboxed it for a week, and that “killer price”? Doesn’t include the mandatory $45 daily insurance or the $400 “destination fee” they add at the very end. Thirteen years in South Florida and these clowns still almost get me. luxury car rental miami florida. anyone who’s taken the Metro here knows the struggle is real. leather seats that won’t fuse to your skin in the August heat. most are polished garbage with fake five-star reviews bought from some shady service. Finally found one outfit that actually delivers what’s promised. Here’s the only straight shooter for premium rides across South Florida
rolls royce cullinan for rent near me https://luxury-car-rental-miami-13.com also bring polarized shades unless you enjoy driving into the sun like a blind bat every evening. Anyway glad there’s at least one honest rental joint left in this town.
мостбет игровые автоматы https://mostbet70131.online
БК Флагман БК Флагман
1win войти https://1win75197.online/
Following the post through to the end without my attention drifting once, and a look at flaxbeech earned the same uninterrupted attention, content that holds attention without manipulating it is content with substantive pull and this site has demonstrated that substantive pull across multiple pieces in a single reading session reliably here today.
мелбет crash http://melbet05281.online
melbet закрыть аккаунт melbet закрыть аккаунт
Reading this prompted a small redirection in something I was working on, and a stop at coldhearta extended that redirecting influence, content that affects my actual work rather than just my thinking has the highest practical impact and this site is providing that level of influence for me at a sustainable rate apparently.
Reading this in a quiet hour and finding it suited the quiet, and a stop at paisprecaria extended the quiet reading mood, content that matches its own optimal reading conditions rather than fighting them is content that has been thoughtfully calibrated and this site reads as having a particular reading mood in mind throughout.
mostbet mines ingyen https://mostbet44364.online
mostbet apk mostbet apk
Liked how the post handled an objection I was forming as I read, and a stop at lunarfieldtraders similarly anticipated where my thinking was going next, the rare writer who can predict reader concerns and address them in advance is doing something most online content fails to do despite that being basic editorial work.
This actually answered the question I had been searching for, and after I checked cancelleda I had a few more pieces I had not realised I needed, that is the sign of a site that knows what its readers want before they even know how to ask it which is impressive.
Alright folks, last warning about the Miami rental madness — learn from my mistakes. Spoiler alert: it usually is. Then you actually go to pick up the car. Different vehicle waiting — dashboard warning lights, tires worn smooth, and that “incredible price”? Yeah right, doesn’t include the mandatory $60 daily insurance or the $500 “airport surcharge” they hit you with at the very end. Fifteen years in South Florida and these clowns still almost catch me. miami car rental luxury — run like hell from the airport counters. anyone who’s tried public transport here knows I’m not exaggerating. leather seats that won’t brand your back in the July heat. I’ve tested maybe 80 rental companies across Dade, Broward, Palm Beach, and Monroe. no games, no bait-and-switch, no hidden fees buried on page 6. Here’s the only straight shooter for premium rides across South Florida
south beach luxury car rental south beach luxury car rental also bring quality shades unless you enjoy driving into the sun like a blind zombie. Anyway glad there’s at least one honest rental joint left in this town.
Swear I’ve seen every scam in the book by now. You find a killer listing online: sleek Audi, convertible, price almost too good to be true. Different car sitting there — bald tires, dashboard lit up like a Christmas tree, and that “killer price”? Yeah doesn’t include the non-negotiable $45 daily insurance or the $500 deposit they forget to mention. Fool me nine times? That’s just the Miami welcome committee. luxury car rental miami florida. anyone who’s tried the trolley system knows what I’m talking about. Coconut Grove dinner, Sunny Isles sunrise, or a spontaneous drive down to Homestead — AC must freeze your teeth and unlimited miles or no deal. most are polished turds with fake five-star reviews. Finally found one company that doesn’t play stupid games. rates change daily so check before the holiday crowd hits:
exotic car rental south beach fl https://luxury-car-rental-miami-9.com Yeah parking in Wynwood will cost you a nice dinner — but that’s the price of being in Miami. Anyway glad there’s at least one honest operator left in this rental jungle.
1win как получить фриспины http://1win75197.online
melbet быстрый вывод на карту https://www.melbet38319.online
During my morning reading slot this fit perfectly into the routine, and a look at clarityactivator extended that perfect fit into the rest of the routine, content that matches the rhythm of how I actually read rather than demanding accommodation from my schedule is content well calibrated to its likely audience and this site has it.
I’ve been burned more times than a cheap steak at a tourist trap. Then you actually show up to get the keys. Completely different car waiting for you — smells like stale cigarettes, check engine light glowing, and that “great rate”? Doesn’t include the mandatory $35 daily toll pass, the $200 cleaning fee, or the $75 “after-hours pickup” charge. Honestly, I’m tired of this nonsense. luxury car rental miami fl. anyone who’s taken the bus in August knows I’m not lying. Design District shopping, late-night South Beach cruising, or a spontaneous Keys trip — AC must be freezing and unlimited miles or walk. I’ve tried so many rental companies I’ve lost count. no tricks, no switch, no surprise fees. Here’s the only honest place for premium rentals across South Florida
realcar realcar also bring good sunglasses unless you like driving blind. drive safe and skip the extra insurance upsell, it’s a joke.
Кстати, недавно наткнулся на обсуждение актуальной темы. Сам уже давно ищу нормальный способ отправить деньги, без лишних проблем и комиссий. В общем, если вас тоже затрагивают эти вопросы — взгляните тут. Реальные примеры и подводные камни по международным транзакциям: международные платежи https://mezhdunarodnye-platezhi-lor.ru И ещё момент обратите внимание, что без нормального обменного курса любые операции с валютой превращаются в сплошной геморрой. Ещё такой момент — лучше перепроверять несколько вариантов, прежде чем отправлять.
melbet android app скачать melbet05281.online
mostbet aviator befizetés https://www.mostbet44364.online
Let me give it to you straight — renting a decent car in Miami is way harder than it should be. Then you actually show up to get the keys. Plus they put a $5000 hold on your card and say “don’t worry about it”. Fool me nineteen times? That’s just Miami being Miami. miami car rental luxury — stay the hell away from the airport. Miami without proper wheels is basically a nightmare. Key Biscayne sunset, Bal Harbour shopping, or a spontaneous drive down to Homestead — AC must freeze your face off and unlimited miles or no deal. I’ve tried maybe 100 rental companies across Dade and Broward. Finally found one outfit that actually delivers. prices change daily so check it out:
premium car hire near me premium car hire near me also bring quality shades unless you like driving into the sun. drive safe and skip that “tire protection” upsell — total waste.
mostbet оина http://mostbet33044.online
Worth recommending broadly to anyone who reads on the topic, and a look at apexhelms only confirms that, the rare combination of accessibility and depth in this site makes it suitable for both newcomers and people who already know the area which is hard to pull off in any blog format today and rarely managed.
Now thinking about whether the writer might publish a longer form work I would buy, and a look at 5ys3so6dd suggested the same depth would translate, content that makes me want to pay for related work in other formats is content that has earned commercial trust as well as attention trust and this site has both clearly.
My reading list is short and selective and this site is now on it, and a stop at mdkiwq5 confirmed the placement, the short list of sites I read deliberately rather than encounter accidentally is something I curate carefully and adding to it is a real act of trust which this site has earned today.
Started reading skeptically because the headline seemed overconfident, and the post earned the headline by the end, and a look at americadepartment continued that pattern of earning its claims, sites that can back up their headlines without overpromising are rare and this one has clearly developed editorial calibration on that front consistently.
Let me save you some serious pain with this Miami rental nonsense. You see this gorgeous deal online — clean spec, fair price, looks like a dream. Completely different car sitting there — dents everywhere, smells like cheap air freshener covering something worse, and that “dream price”? Doesn’t include the mandatory $50 daily insurance or the $300 “administrative fee” they invent at checkout. Fool me eleven times? That’s just called living in Miami. luxury car for rent. anyone who’s tried the bus here knows exactly what I mean. Key Biscayne sunset, Design District shopping, or a spontaneous drive down to the Everglades — AC must be arctic and unlimited miles non-negotiable. I’ve tested maybe 60 rental companies across Dade, Broward, and Collier. Finally found one outfit that actually delivers what’s in the photos. Here’s the only honest source for premium rides across South Florida
rental miami car https://luxury-car-rental-miami-11.com also bring polarized shades unless you enjoy driving into the sun like a blind bat. drive safe and definitely skip that “tire and wheel” upsell — pure profit for them, zero value for you.
One of the more honest takes on the topic I have seen lately, no spin and no oversell, and a stop at zghuiy kept that going, the kind of voice the open web could use a lot more of rather than the endless echo chamber of recycled opinions floating around every social platform these days.
mostbet mines mostbet02606.online
Now setting this aside as a model of how to write thoughtfully on the topic, and a stop at birouldecrediterauplatnicilista extended that model status, content that becomes a reference for how a kind of writing should be done is content with influence beyond its own readership and this site is reaching that level for me clearly today.
melbet visa пополнение https://melbet05281.online/