This page has been translated from English
.

התקנה / שדרוג WORDPRESS עם חתרנות - VPS התנ"ך # 15

English אנגלית (שינוי)
  • Digg
  • Twitter
  • Technorati
  • del.icio.us
  • Facebook
  • MySpace
  • Reddit
  • StumbleUpon
  • LinkedIn
  • email

הגדרת VPS שאינם מנוהלים (4 newbies) - חלק 15: וורדפרס ועדכונים ההתקנה של שורת הפקודה

לוגו חתרנות WordPress תמונה

איך זה להנחות-Subversion משתמש כדי להוריד & להתקין הבלוגים WordPress Plugins & העצמאי שלהם, במהירות ובקלות מתוך לינוקס ממשק שורת פקודה שלך, עם העדכונים פשוט לאחר מכן. זה גם מפרט את וורדפרס MySQL Database תהליך ההתקנה.

בסדר, אני מודה, אני משוחד לכיוון וורדפרס! ואת מדריך זה היא התאמה מושלמת עבור אלה המבקשים לפתוח בלוג WP שלהם מתוך VPS בזמן המהיר מיועד הגהה בעתיד.

עם זאת, אם אתה משתמש אחד מתוך אלפי בפלטפורמות אחרות שניתן להתקין באמצעות חתרנות, תהליך ההתקנה לא disimilar. אם יש לך שאלות ספציפיות, על כל פלטפורמה, להשאיר תגובה ואני אנסה לעזור. מי יודע, אולי אפילו לכתוב מדריך ספציפי.

WordPressers - להכין לשמור צרורות של זמן.

להגדיר VPS שאינם מנוהלים (4 newbies) .. התנ"ך VPS

בעותק 20 / צעדים להדביק .. מאפס לגיבור, התיבה ריקה כדי חמוד-כשרת לינוקס.

גלול מטה על מדד סדרת מלא.

אז, היי, מחסן משותף & Viva וירטואלי! Hope it helps. The_guv

חיוני שרת אינטרנט הכנה WordPress

ב חלק 8: VPS מהר! הגדרת PHP, MySQL & Xcache, בין היתר, התקנו חתרנות. בתוך חלק 11: התקן Nginx (אפאצ 'י או יותר Lighttpd) הקמנו Nginx. בתוך חלק 13: הגדר Nginx Multi-Site וירטואלית מארחים אנחנו משופרת מבנה קובץ Nginx ואיפשר עבור רב באתר אירוח. בתוך חלק 14: התקנת וורדפרס על Nginx (FURLs & מטמון), אנחנו צבט Nginx כדי לייעל את ההגשה של וורדפרס. אם אתה חסר כל אלה, לחזור על עקבותיו.

בסוף מדריך זה, נצטרך לעבוד וורדפרס. במתיקות.

להלן הדרישות שלך: --

  • ליצור מסד נתונים
  • להתקין WordPress
  • להוסיף plugins מועדפת
  • ייבוא הנושא שלך
  • להעביר נתונים

אם אתה רוצה בלוג חדש, תוכלו לבצע את ארבעת הראשונים מהשלבים האלה.

הדבר פתח את המסוף שלך CLI. אם אתה משתמש ב-Windows באופן מקומי לא עשית כך, ליצור גישה בשרת מרוחק, מאובטח על מנת להקל על תהליך הכניסה עצומה. בשביל זה, חלק לקרוא 3: להגדיר חיבור מרוחק מוצפן & חלק 4: הסתר Data & התחברות פשוטה - SSH & PuTTY.

... בזמן שאני מנדנדת, אם אתה לא כבר, אתה צריך גם לבצע חלק 6: Linux LOCK - SSH & iptables Firewall.

רק הערה אחת לאחרונה. throughout this guide. אני למשל לינוקס / guvnr MySQL שלי שם המשתמש שלי באתר waywiderweb.com במדריך זה. החלף את הערכים האלה עם משלך :?

ימין. מוכן לתזוזה.

יצירת מסד הנתונים MySQL עבור WordPress מתוך שורת הפקודה

התחברות ל-MySQL עם: --

mysql -u root -p

Add your password, or the password we created when we installed MySQL in Part 8: FASTER VPS! Set Up PHP, MySQL & Xcache .

Now paste this lot, replacing your_wordpress_username , your_wordpress_password and wp_database_name with yours, and leaving the quote marks I've included for the password:-

grant all privileges on *.* to your_wordpress_username@localhost identified by "your_wordpress_password";
create database wp_database_name;
quit

Install WordPress on your Linux VPS Using Subversion

Let's go to the directory in which to install WordPress. I'm installing to my root directory, /home/public_html/waywiderweb.com/public , which I created in Part 13: Configure NGINX Multi-Site Virtual Hosts (the directory structure is explained most comprehensively in the video in Part 13.) If you want your blog to appear in a sub-directory, such as waywiderweb.com/blog, then use /home/public_html/waywiderweb.com/public/blog . Of course, change waywiderweb.com for your domain:-

cd /home/public_html/waywiderweb.com/public

If you created a test index.html file in Part 13: Configure NGINX Multi-Site Virtual Hosts , let's bin it:-

sudo rm index.html

Now we'll use the subversion command to install the latest version of WordPress. Ammend this version with any newer one. Leave the dot at the end, it's not a typo:-

sudo svn co http://svn.automattic.com/wordpress/tags/2.8.4 .

And create the WordPress config file:-

sudo mv wp-config-sample.php wp-config.php

Now let's connect the database. Open the WP config file:-

sudo nano wp-config.php
...and add the details you entered above into your new MySQL database. So, in the wp_config file, swap putyourdbnamehere , usernamehere and yourpasswordhere . Here's the original wp-config, before you change it:-
/** The name of the database for WordPress */
define('DB_NAME', 'putyourdbnamehere');

/** MySQL database username */
define('DB_USER', 'usernamehere');

/** MySQL database password */
define('DB_PASSWORD', 'yourpasswordhere');

While you're in there, for added security, find:-

$table_prefix  = 'wp_';

...and swap wp_ to something unique.

Save and quit (CTRL-X, 'y' to confirm and hit Return.)

Run WordPress Install & Connect the MySQL Database

Open your blog in a browser, so for me, for instance, that's www.waywiderweb.com. Enter a few details, log in and change the password the WP installer gave the newly created Admin user. You should really delete Admin entirely and replace with another user, but that's another story.

Hack-Proof Your Blog

For complete WP security tips, read Video How-to: 10 Tips To Make WordPress Hack-Proof but ignore the bit about htaccess as that's an Apache thing, not Nginx.

Hmmn, if anyone's got any specific Nginx blog security tips, lemme know please. I'll write it up.

Batch-install WordPress Plugins using Subversion

This bit really rocks my roger. If you've got a bunch of blogs with pretty much the same plugins, you may just save a month of Sundays here.

Back at the CLI, goto the plugin directory:-

cd /home/public_html/waywiderweb.com/public/wp-content/plugins

Let's edit our plugin list. Keep that dot:-

sudo svn propedit svn:externals .

OK, so there's only Akismet in there. Let's add some more. Go to the WordPress Subversion plugin repository and take your pick. For each plugin you have 2 download choices:-

  • tags - stable releases by version, so choose generally the latest
  • trunk - latest version, bleeding edge, occasionally buggy

Personally, I run the trunk versions, for the simple reason that I can install or upgrade all plugins by issuing a simple command, thereafter. If a plugin gives me any gip, I simply delete it and its reference in my svn WP plugins list, else I replace its trunk with a tag. Of course, if you use the tags option, you have to keep editing your plugins file, which largely negates having it in the first place.

So, here's an example externals file that I've thrown together. Note the name of each plugin before the link, 'cos you must have that identifier. If you followed Part 14: Setup WordPress on NGINX (FURLs & Cache), you'll notice I've included the WP Super Cache plugin:-

akismet http://plugins.svn.wordpress.org/akismet/trunk/
wp-phpmyadmin http://svn.wp-plugins.org/wp-phpmyadmin/
wp-super-cache http://svn.wp-plugins.org/wp-super-cache/trunk/

TIDY TIP: If you're happy with trunks, in the WP Sub Vers Repos, look down the list and right mouse click > Copy Link Location , then paste it to a text file, adding the name of the plugin before the link. Do that to as many plugins as you want, then simply paste /trunk at the end of each link. Then paste the lot to your svn plugins file. Much quicker. If you want tagged versions, it's the long way round, 'cos the tags differ. Then again, for some plugins, there is no svn listing at all, so those have to be included the old-fashioned way.

Right, with your plugins file edited, saved and closed, now type:-

sudo svn update

Take tea.

Import Your WordPress Theme

Set Linux Folder Permissions

If you didn't in Part 13: Configure NGINX Multi-Site Virtual Hosts , set your folder permissions, allowing SFTP access, substituting guvnr with your user name:-

sudo chown -R guvnr:webmasters /home/public_html

Add the theme

If you are using a regular theme, add it in the usual WordPress way.

Alternatively, if you want to use a previous, adapted theme:-

Open an SFTP client like FileZilla or WinSCP, browse to your remote themes directory - something like /home/public_html/waywiderweb.com/public/wp-content/themes/ - and upload your bespoke theme.

Either way, you can now enable the theme in the regular way, at http://your_blog.com/wp-admin/themes.php .

Relocate Your Existing WP Blog Data

...If you've got any to relocate! For new blogs, skip this bit.

You can do this by exporting from the old and importing into the new database. In my experience it's far easier to use WP's export/import tools, which also optimises the data.

Surf to your original blog:-

http://www.your_ORIGINAL_blog.com/wp-admin/export.php

...or Dashboard > Tools > Export .

And Download export file .

Now goto your new blog:-

http://www.your_ORIGINAL_blog.com/wp-admin/import.php

...or Dashboard > Tools > Import .

Click the WordPress option, choose the exported file and Upload file and import . Prompted, check the box Download and import file attachments .

If you receive any errors, that's probably a permissions problem. For example, I got this:-

Unable to create directory /home/public_html/waywiderweb.com/public/wp-content/uploads/2009/04. Is its parent directory writable by the server?

...So we'll take ownership of the directory:-

sudo chown -R guvnr:webmasters /home/public_html/waywiderweb.com
sudo chmod -R g+w /home/public_html/waywiderweb.com

And now have another go with Upload file and import , opting for our user imports and checking the box Download and import file attachments .

If you'd prefer to relocate select data, there's always wp-phpmyadmin .

Activating WP Super Cache

Activate in the usual WordPress way, and cash in on the groundwork of Part 13: Configure NGINX Multi-Site Virtual Hosts . Cash in, geddit! Sorry.

Updating WordPress Plugins

While 2.7 brought in some top functionality with the WordPress auto-updating, pretty much negating using Subversion to update the platform or plugins, there will be occasions when it's still faster to upgrade plugins this way.

Particularly this will be the case after a platform upgrade, when plugins race to bring out updates, they can be upgraded together using Subversion:-

sudo svn update

Sending Live a Relocated WordPress Blog

Refer to Part 19: Moving Day! How to Move Your Blog or Site for the best way to do this, with the least downtime or other sticky problems.

Rinse & Repeat

Follow this process for your entire blog farm.

Just Round the Corner

For WordPress, that's all the specifics taken care of, I think. You tell me, what have I forgotten? Lemme know and I'll write it up.

More generally, I'll wrap up the series - Set Up Unmanaged VPS (4 Newbies) .. The VPS Bible - by showing how and why to setup Google Apps in Part 17: Google Apps for Domain-Specific Email , which keeps our VPS server resources jealously focussed on our sites and blogs, before running down the all-important moving day checklist mentioned above. Then there'll be a handy backup guide before linking a heap of top resources for Linux newbies in Part 20: Blogroll, Links, Credits, Resources .

Guess what...


SETUP an Unmanaged VPS (4 Newbies) .. The V-P-S Bible

Serve multi sites & blogs on a budget .. at the fastest possible speed .. with the least downtime .. in the most secure environment .. and future-proofed for easy admin.

That's what the VPS Bible is about, stepped out in simple copy & paste guides.

From high traffic WordPress blogs to startup web hosts, here's what you need.

Set it up?   Click here for the 21 part follow-up .. V-P-S Admin

  1. * Includes video tutorial.

  2. Not linked = not published. Won't be long. Fix a feed for updates.


If you liked that ...
  • Set Up Unmanaged VPS (4 Newbies) - Part 3: Set Up Command Line Interface (CLI) using PuTTY

    After installing your Linux OS on your unmanaged virtual private server, say, with Linode, Slicehost or others, you may be wondering, "How do I access it, securely & easily?!" If you're using Windows locally, [...]
  • Set Up Unmanaged VPS (4 Newbies) - Part 8: PHP5, MySQL and Xcache (for Platforms like WordPress)

    Bolt on PHP5 for server-side web applications, Xcache to speed things up and MySQL to handle our databases. And tweak that lot for optimum performance of platforms from WordPress to Drupal. From the first seven [...]
  • Set Up Unmanaged VPS (4 Newbies) - Part 14: Tweak Nginx for WordPress - Pretty URLs & WP Super Cache

    For the blog platform WordPress to work properly with Nginx we need to tweak the web server configuration. This tutorial will enable both caching - integrating the WP Super Cache plugin - and activate pretty [...]
  • A User-Friendly Command Line Shell .. (Yup, For Real!)

    This guide & cheatsheet - using simple memorable commands, not complex syntax - will make you not only faster at the Linux shell, but enjoy it too. Copying over my old bashrc file to a new install (it lives in [...]
  • mysql -u root -p

    Add your password, or the password we created when we installed MySQL in Part 8: FASTER VPS! Set Up PHP, MySQL & Xcache .

    Now paste this lot, replacing your_wordpress_username , your_wordpress_password and wp_database_name with yours, and leaving the quote marks I've included for the password:-

    grant all privileges on *.* to your_wordpress_username@localhost identified by "your_wordpress_password";
    create database wp_database_name;
    quit
    

    Install WordPress on your Linux VPS Using Subversion

    Let's go to the directory in which to install WordPress. I'm installing to my root directory, /home/public_html/waywiderweb.com/public , which I created in Part 13: Configure NGINX Multi-Site Virtual Hosts (the directory structure is explained most comprehensively in the video in Part 13.) If you want your blog to appear in a sub-directory, such as waywiderweb.com/blog, then use /home/public_html/waywiderweb.com/public/blog . Of course, change waywiderweb.com for your domain:-

    cd /home/public_html/waywiderweb.com/public

    If you created a test index.html file in Part 13: Configure NGINX Multi-Site Virtual Hosts , let's bin it:-

    sudo rm index.html

    Now we'll use the subversion command to install the latest version of WordPress. Ammend this version with any newer one. Leave the dot at the end, it's not a typo:-

    sudo svn co http://svn.automattic.com/wordpress/tags/2.8.4 .

    And create the WordPress config file:-

    sudo mv wp-config-sample.php wp-config.php

    Now let's connect the database. Open the WP config file:-

    sudo nano wp-config.php
    ...and add the details you entered above into your new MySQL database. So, in the wp_config file, swap putyourdbnamehere , usernamehere and yourpasswordhere . Here's the original wp-config, before you change it:-
    /** The name of the database for WordPress */
    define('DB_NAME', 'putyourdbnamehere');
    
    /** MySQL database username */
    define('DB_USER', 'usernamehere');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'yourpasswordhere');
    

    While you're in there, for added security, find:-

    $table_prefix  = 'wp_';

    ...and swap wp_ to something unique.

    Save and quit (CTRL-X, 'y' to confirm and hit Return.)

    Run WordPress Install & Connect the MySQL Database

    Open your blog in a browser, so for me, for instance, that's www.waywiderweb.com. Enter a few details, log in and change the password the WP installer gave the newly created Admin user. You should really delete Admin entirely and replace with another user, but that's another story.

    Hack-Proof Your Blog

    For complete WP security tips, read Video How-to: 10 Tips To Make WordPress Hack-Proof but ignore the bit about htaccess as that's an Apache thing, not Nginx.

    Hmmn, if anyone's got any specific Nginx blog security tips, lemme know please. I'll write it up.

    Batch-install WordPress Plugins using Subversion

    This bit really rocks my roger. If you've got a bunch of blogs with pretty much the same plugins, you may just save a month of Sundays here.

    Back at the CLI, goto the plugin directory:-

    cd /home/public_html/waywiderweb.com/public/wp-content/plugins

    Let's edit our plugin list. Keep that dot:-

    sudo svn propedit svn:externals .

    OK, so there's only Akismet in there. Let's add some more. Go to the WordPress Subversion plugin repository and take your pick. For each plugin you have 2 download choices:-

    • tags - stable releases by version, so choose generally the latest
    • trunk - latest version, bleeding edge, occasionally buggy

    Personally, I run the trunk versions, for the simple reason that I can install or upgrade all plugins by issuing a simple command, thereafter. If a plugin gives me any gip, I simply delete it and its reference in my svn WP plugins list, else I replace its trunk with a tag. Of course, if you use the tags option, you have to keep editing your plugins file, which largely negates having it in the first place.

    So, here's an example externals file that I've thrown together. Note the name of each plugin before the link, 'cos you must have that identifier. If you followed Part 14: Setup WordPress on NGINX (FURLs & Cache), you'll notice I've included the WP Super Cache plugin:-

    akismet http://plugins.svn.wordpress.org/akismet/trunk/
    wp-phpmyadmin http://svn.wp-plugins.org/wp-phpmyadmin/
    wp-super-cache http://svn.wp-plugins.org/wp-super-cache/trunk/
    

    TIDY TIP: If you're happy with trunks, in the WP Sub Vers Repos, look down the list and right mouse click > Copy Link Location , then paste it to a text file, adding the name of the plugin before the link. Do that to as many plugins as you want, then simply paste /trunk at the end of each link. Then paste the lot to your svn plugins file. Much quicker. If you want tagged versions, it's the long way round, 'cos the tags differ. Then again, for some plugins, there is no svn listing at all, so those have to be included the old-fashioned way.

    Right, with your plugins file edited, saved and closed, now type:-

    sudo svn update

    Take tea.

    Import Your WordPress Theme

    Set Linux Folder Permissions

    If you didn't in Part 13: Configure NGINX Multi-Site Virtual Hosts , set your folder permissions, allowing SFTP access, substituting guvnr with your user name:-

    sudo chown -R guvnr:webmasters /home/public_html

    Add the theme

    If you are using a regular theme, add it in the usual WordPress way.

    Alternatively, if you want to use a previous, adapted theme:-

    Open an SFTP client like FileZilla or WinSCP, browse to your remote themes directory - something like /home/public_html/waywiderweb.com/public/wp-content/themes/ - and upload your bespoke theme.

    Either way, you can now enable the theme in the regular way, at http://your_blog.com/wp-admin/themes.php .

    Relocate Your Existing WP Blog Data

    ...If you've got any to relocate! For new blogs, skip this bit.

    You can do this by exporting from the old and importing into the new database. In my experience it's far easier to use WP's export/import tools, which also optimises the data.

    Surf to your original blog:-

    http://www.your_ORIGINAL_blog.com/wp-admin/export.php

    ...or Dashboard > Tools > Export .

    And Download export file .

    Now goto your new blog:-

    http://www.your_ORIGINAL_blog.com/wp-admin/import.php

    ...or Dashboard > Tools > Import .

    Click the WordPress option, choose the exported file and Upload file and import . Prompted, check the box Download and import file attachments .

    If you receive any errors, that's probably a permissions problem. For example, I got this:-

    Unable to create directory /home/public_html/waywiderweb.com/public/wp-content/uploads/2009/04. Is its parent directory writable by the server?

    ...So we'll take ownership of the directory:-

    sudo chown -R guvnr:webmasters /home/public_html/waywiderweb.com
    sudo chmod -R g+w /home/public_html/waywiderweb.com
    

    And now have another go with Upload file and import , opting for our user imports and checking the box Download and import file attachments .

    If you'd prefer to relocate select data, there's always wp-phpmyadmin .

    Activating WP Super Cache

    Activate in the usual WordPress way, and cash in on the groundwork of Part 13: Configure NGINX Multi-Site Virtual Hosts . Cash in, geddit! Sorry.

    Updating WordPress Plugins

    While 2.7 brought in some top functionality with the WordPress auto-updating, pretty much negating using Subversion to update the platform or plugins, there will be occasions when it's still faster to upgrade plugins this way.

    Particularly this will be the case after a platform upgrade, when plugins race to bring out updates, they can be upgraded together using Subversion:-

    sudo svn update

    Sending Live a Relocated WordPress Blog

    Refer to Part 19: Moving Day! How to Move Your Blog or Site for the best way to do this, with the least downtime or other sticky problems.

    Rinse & Repeat

    Follow this process for your entire blog farm.

    Just Round the Corner

    For WordPress, that's all the specifics taken care of, I think. You tell me, what have I forgotten? Lemme know and I'll write it up.

    More generally, I'll wrap up the series - Set Up Unmanaged VPS (4 Newbies) .. The VPS Bible - by showing how and why to setup Google Apps in Part 17: Google Apps for Domain-Specific Email , which keeps our VPS server resources jealously focussed on our sites and blogs, before running down the all-important moving day checklist mentioned above. Then there'll be a handy backup guide before linking a heap of top resources for Linux newbies in Part 20: Blogroll, Links, Credits, Resources .

    Guess what...


    SETUP an Unmanaged VPS (4 Newbies) .. The V-P-S Bible

    Serve multi sites & blogs on a budget .. at the fastest possible speed .. with the least downtime .. in the most secure environment .. and future-proofed for easy admin.

    That's what the VPS Bible is about, stepped out in simple copy & paste guides.

    From high traffic WordPress blogs to startup web hosts, here's what you need.

    Set it up?   Click here for the 21 part follow-up .. V-P-S Admin

    1. * Includes video tutorial.

    2. Not linked = not published. Won't be long. Fix a feed for updates.


    If you liked that ...
    ... maybe you'll like these?

.