拖了一个月终于着手并且完成了。其实没有什么难的。但是因为我对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是傻瓜操作,没有怎么弄?这个我也弄了好半天最终解决了,马上再写一篇单独说吧
好啦好啦,到此结束,路人有问题可以在下面留言~
Thanks for the breakdown, it gave me a clearer picture of something I had been confused about for a while now, and a stop at startyournextmove closed the remaining gaps in my understanding nicely, no need to hunt around twenty other articles to put the pieces together which is a real time saver.
Started imagining how I would explain the topic to someone else after reading, and a look at ivebump gave me more material for that imagined explanation, content that improves my own ability to discuss a topic is content that has actually transferred knowledge rather than just decorating my screen for a few minutes.
Even just sampling a few posts the consistency is what stands out, and a look at clearpathcreation confirmed the broader pattern, sites where every piece I sample lives up to the standard set by the others are sites with serious quality control and this one has clearly invested in whatever editorial process produces that consistency reliably.
Glad I clicked through from where I did because this turned out to be worth the time spent, and after discovernewanglestoday I had a fuller picture, the kind of content that earns its visitors through delivering value rather than chasing them through aggressive advertising or constant pop ups appearing everywhere on the screen lately.
Слушайте, реально замучилась искать нормальную платформу для дочки. Везде одна вода или заоблачные ценники. Соседка по площадке посоветовала глянуть вот этот проект: online school . Пришлось признать, что был не прав. Успеваемость подтянулась, особенно по точным наукам. Объясняют на пальцах, без лишней воды. Плюс огромный – никаких больничных, заболел – смотришь записи. Для современных детей самое то, ИМХО.
Слушайте, реально замучилась искать нормальную платформу для дочки. Везде одна вода или заоблачные ценники. Соседка по площадке посоветовала глянуть вот этот проект: онлайн обучение для детей . Фишка в том, что можно спокойно закрыть программу без нервов и репетиторов по вечерам. Техподдержка отвечает быстро. Платформа не виснет на вебинарах, что для меня было критично. Короче, кому надоело возить чадо через весь город под дождем – заглядывайте.
Bookmark added with a small note about why, and a look at explorefuturepathways prompted another bookmark with another note, the bookmarks I annotate are the ones I expect to return to deliberately rather than stumble into and this site is generating annotated bookmarks at a higher rate than my usual content sources by some margin.
Honest opinion is that this is the kind of post that builds long term trust with readers, and a look at discovernewdirectionpathsnow reinforced that perception, the slow accumulation of trust through consistent quality is the only sustainable way to build a real audience and this site is clearly playing that long game.
Honest reaction is that this is the kind of writing I would defend in a conversation about good blog content, and a look at shoreskipper reinforced that, the rare site whose work I would actively recommend rather than just tolerate is the kind I want to support through return visits regularly.
Now saved this in a way that I will actually find again rather than the casual bookmark approach, and a stop at growresultsdriven earned the same careful saving, organising my reading bookmarks so that high quality sources rise to the top is something I should do more of and this site triggered that organisation today.
Looking at this objectively the editorial quality is hard to deny even setting aside personal taste, and a stop at createprogressfocusedstrategy maintained the same objective quality, the gap between what I personally enjoy and what is objectively well crafted exists and this site clears both bars simultaneously which is rarer than it sounds.
A piece that handled multiple complications without becoming confused, and a look at createimpactforward continued that organisational clarity, holding multiple threads in a single piece without losing any of them is a sign of skilled writing and this site has clearly developed the editorial discipline to manage complexity without sacrificing readability throughout.
Useful enough to recommend to several people I know who would appreciate it, and a stop at findgrowthopportunitiesnow added more material I will pass along too, the kind of writing that earns word of mouth is the kind that actually delivers on its promises which is what this site does without any drama or fanfare attached.
Working through this site has been a small antidote to the shallow content that fills most of my reading time, and a stop at startbuildingfuture extended that antidote function, sites that quietly improve the average quality of my reading by being themselves are sites worth supporting through return visits and recommendations consistently.
Чтобы быстро и эффективно гайд, воспользуйтесь платформами которые не врут.
Знаете, многие лезут в дебри, а зря.
Порой простой поиск позволяет обнаружить имя человека или его профиль.
Надеюсь, понятно объяснил.
Thanks for sharing this with the open internet rather than locking it behind a paywall like so many sites do now, and a stop at findyournextphase kept the same vibe going, generous helpful and clearly written by someone who actually wants people to learn from it rather than just charge them.
A piece that did not try to be timeless and ended up reading as durable anyway, and a look at startyournextmove extended that durable feel, content that stays useful past its publication date without straining for permanence is content that ages well and this site has the kind of evergreen quality that I value highly today.
Worth marking the moment when reading this clicked into something useful for my own work, and a look at claritydrivenexecution extended that practical click, content that connects to my actual life rather than just being interesting is content with the highest kind of value and this site is generating that connection at a high rate.
Pass this along to colleagues if the topic comes up, the framing here is sensible, and a stop at startyourgrowthpath adds more useful angles to share, the kind of content that improves conversations rather than just feeding them is what makes a resource genuinely valuable in professional contexts going forward over time and across project boundaries too.
Now feeling slightly more optimistic about the state of independent writing online, and a stop at discovergrowthdirectionpaths extended that quiet optimism, sites like this one are the reason I have not given up on the open web entirely and finding them occasionally renews the case for paying attention to non algorithmic content sources today.
Thank you for the genuine effort here, it shows in every paragraph and not just the headline, and after my visit to forwardthinkingengine 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.
Давно искал нормальный вариант, где реально дают живые знания. Особенно когда речь про онлайн-школу для детей — тут ведь нужна нормальная подача. У меня племянник как раз перешел на удаленку, так что намучились мы знатно. В общем, вся подробная информация вот тут: онлайн школы для детей https://shkola-onlajn-55.ru Я если честно ещё до этого вообще не верил в онлайн образование школа. Оказалось — зря сомневался. У них и домашка без перегруза. Сам теперь советую знакомым. Надеюсь, поможет в выборе.
Really appreciate that the writer did not assume I would read every other related post first, and a look at discovernewdirectionpathsnow kept that self contained feel going where each piece can stand alone, accessibility for new readers is a sign of generous editorial thinking and this site has clearly invested in that approach.
Чтобы быстро и эффективно гайд, воспользуйтесь такими штуками которые дают инфу.
Слушай, тут главное — без глупостей.
Поисковые системы и социальные сети нередко дают полезные подсказки.
Да, и ещё момент — без фанатизма.
Stands out for actually being useful instead of just being long, and a look at ivebump 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.
Quality work here, the post reads cleanly and the points stay focused throughout, and a stop at explorefuturepathways kept the standard high, you can tell the writer cares about the final result rather than just hitting publish for the sake of having something new on the page to feed the search engines.
I came here looking for a quick answer and ended up reading the whole post because it was actually interesting, and after discovernextdirection I had a much fuller picture, no stress and no confusion just a clear walk through the topic that made everything fall into place without much effort.
Picked this up while looking for something else and ended up reading every paragraph because it was actually informative, and after discoveropportunitypathways I was sure I would come back, that does not happen often when most sites bury the useful parts under endless ads and pop ups today and across most categories online.
Народ, приветствую. Дело деликатное, но решил черкануть пару строк, потому что в экстренной ситуации трудно сориентироваться. Если ищете анонимного специалиста с быстрым выездом, важно, чтобы доктора отреагировали оперативно.
Мы в свое время тоже столкнулись с этой бедой, и в итоге нашли клинику, где врачи работают профессионально. Чтобы узнать точные цены и вызвать специалиста, вся информация есть здесь: выход из запоя в стационаре выход из запоя в стационаре.
Там расписаны все аспекты, которые стоит учитывать, реагируют очень быстро, буквально за час. Надеюсь, эта рекомендация и обращайтесь к настоящим профессионалам. Всем душевного спокойствия!
Признаюсь, сначала очень сильно сомневался в этой затее, но после изучения реальных отзывов наткнулся на один нормальный человеческий вариант. Короче, вот что я понял: современная школа онлайн — это не просто унылые вебинарчики. Там и преподаватели живые и вовлеченные, что очень радует на практике.
В общем, кому реально нужно нормальное обучение в теме онлайн образование школа — посмотрите условия, вот здесь все выложено без лишней воды: online school online school.
Если честно, даже не ожидал такого крутого качества. Потому что обычная школа часто проигрывает по всем фронтам, а тут организована именно частная школа онлайн. Держите этот вариант у себя в закладках.
Reading this gave me a small refresher on something I had partially forgotten, and a stop at growstepbyintent extended the refresher, content that strengthens existing knowledge rather than just adding new is content with a particular kind of consolidating value and this site is providing that consolidating function across multiple visits.
A genuine pleasure to find a site that publishes at a sustainable cadence rather than chasing the daily content treadmill, and a look at seoloom confirmed the careful publication rhythm, sites that prioritise quality over frequency are rare and this one has clearly chosen the slower pace which I appreciate as a reader.
Давно искал инфу и наконец-то нашел нормальный разбор темы. Там всё разложено по полочкам, без лишней воды и тупых SEO-текстов. Рекомендую заглянуть, чтобы не совершать глупых ошибок, как я в прошлый раз. Вот мелбет казино скачать на андроид мелбет казино скачать на андроид — переходите, там вся суть. Там внутри и примеры, и пошаговые инструкции, короче полный фарш.
Solid value for anyone willing to read carefully, and a look at findyournextgrowthstage extends that value across the rest of the site, this is the kind of place that rewards return visits rather than offering everything in a single splashy post and then leaving readers nothing to come back for later which is unfortunately common.
Чтобы быстро и эффективно подробнее тут, воспользуйтесь такими штуками которые дают инфу.
В общем, тема такая, не для паники.
Найти человека по номеру телефона можно с использованием легальных инструментов.
Да, и ещё момент — без фанатизма.
Easily one of the better explanations I have read on the topic, and a stop at explorefuturepathwaysfast pushed it even higher in my mental ranking of useful resources, the kind of site that beats the average not by trying harder but by simply caring more about what it puts out daily which always shows.
Чтобы быстро и эффективно узнать местонахождение по номеру телефона, воспользуйтесь нормальными ребята реально помогают.
Знаете, многие лезут в дебри, а зря.
Поиск человека по номеру телефона возможен при помощи законных методов.
Надеюсь, понятно объяснил.
Glad I gave this a chance instead of bouncing on the headline, and after learnandgrowforward I was certain I had made the right call, snap judgements based on titles miss a lot of good content and this is a reminder to slow down and check things out before scrolling past in a hurry.
I came here looking for a quick answer and ended up reading the whole post because it was actually interesting, and after clearpathcreation I had a much fuller picture, no stress and no confusion just a clear walk through the topic that made everything fall into place without much effort.
Worth pointing out the careful word choice in this post, no buzzwords and no jargon, and a look at claritydrivenexecution continued that disciplined vocabulary, sites that resist the pull of trendy language are sites that will read well in five years and this one is clearly built for that kind of long durability.
Felt the writer respected the topic without being precious about it, and a look at buildlongtermdirection continued that respectful but unfussy treatment, finding the right register for serious topics is hard and this site has clearly figured out how to take the topic seriously while still being readable for casual visitors regularly.
Useful enough to recommend to several people I know who would appreciate it, and a stop at findgrowthopportunitiesnow added more material I will pass along too, the kind of writing that earns word of mouth is the kind that actually delivers on its promises which is what this site does without any drama or fanfare attached.
Давно хотел найти толковое место, где реально не грузят лишней теорией. Особенно когда речь про образовательные онлайн школы — тут ведь нужна нормальная подача. У меня дочка как раз начал учиться дистанционно, так что намучились мы знатно. В общем, посмотрите по ссылке: образовательные онлайн школы образовательные онлайн школы Я если честно ещё пару месяцев назад вообще не верил в онлайн образование школа. Оказалось — всё гораздо лучше. У них и программа грамотная. Сам теперь советую знакомым. Удачи!
During a quiet evening reading session this provided just the right depth without being heavy, and a stop at learnandprogressconsistently maintained the same evening appropriate weight, content with depth that does not exhaust the reader is content with editorial calibration and this site has clearly figured out how to be substantial without being demanding all the time.
Pass this along to colleagues if the topic comes up, the framing here is sensible, and a stop at startyourgrowthpath adds more useful angles to share, the kind of content that improves conversations rather than just feeding them is what makes a resource genuinely valuable in professional contexts going forward over time and across project boundaries too.
Stands apart from similar pages by actually being useful, that is high praise these days, and a look at buildstrongfoundations kept that standard going, you can tell when a site is built around the reader versus around metrics and this one clearly belongs to the first category for sure based on what I read.
Now feeling the quiet pleasure of finding writing that takes itself seriously without being self serious, and a stop at shoreskipper extended that subtle pleasure, the gap between earnest and pretentious is fine and this site has clearly chosen to land on the earnest side without slipping over into pretentious which is impressive.
Reading this in the morning set a good tone for the day, and a quick visit to createforwardsteps kept that good tone going, content can do that sometimes when it hits the right notes and finding sites that consistently strike that tone is something I have learned to recognise and reward with regular visits.
Working through this site has been a small antidote to the shallow content that fills most of my reading time, and a stop at forwardthinkingengine extended that antidote function, sites that quietly improve the average quality of my reading by being themselves are sites worth supporting through return visits and recommendations consistently.
Excellent execution from start to finish, the post never loses its rhythm and the points stay sharp, and a quick stop at discovernextdirection kept the same level going, consistency like this across a site is the marker of a serious operation rather than a casual side project running on autopilot somewhere else.