Chapter 60: Alternate Media Storage . Naxa AC-1
Add to my manualsadvertisement
Chapter 60:
Alternate Media Storage
Magento Community Edition gives you the option to store media files in a database on a database server, or on a Content Delivery Network (CDN), as opposed to storing them on the file system of the web server. The advantage of using alternate storage is that it minimizes the effort required to synchronize media when multiple instances of the system that are deployed on different servers that need access to the same images, CSS files, and other media files.
CDN as alternate media storage is implemented as a support option only, not as a full integration with a specific CDN. You must choose and configure a CDN on your own.
Using a Database for Media Storage
By default, all images, compiled CSS files, and compiled JavaScript files of the
Magento instance are stored in the file system on the web server. You can choose to store these files in a database on a database server. One advantage of this approach is the option of automatic synchronization and reverse synchronization between the web server file system and the database. You can use the default database to store media or create a new one. To be able to use a newly created database as media storage, you must add information about it and its access credentials to the local.xml file.
To use a database for media storage:
1.
On the Admin menu, select System > Configuration .
2.
In the panel on the left, under Advanced, select System .
3.
This configuration takes place at the global level, so set Current Configuration
Scope to “Default Config.”
4.
Click to expand the Storage Configuration for Media section. Then, do the following:
Magento Community Edition: User Guide 667
Using a Content Delivery Network Chapter 60: Alternate Media Storage
668
Storage Configuration for Media a.
Set Media Storage to “Database.” b.
Set Select Media Database to the database you want to use.
c.
Click the Synchronize button to transfer the existing media to the newly selected database.
d.
Enter the Environment Update Time in seconds.
5.
When complete, click the Save Config button.
Accessing Media from a Database
When the customer opens the store page, its browser requests the HTML code and the media specified in the HTML code from the Magento system. The system searches the requested media in the file system and passes it to the browser, if it is found. If the system does not find the media in the file system, it requests the media from the database specified in the settings, places the media to the file system, and sends it to the customer’s web browser.
To get the files from the database to the file system on the web server a PHP script is used. When the browser requests media from the web server, there are two alternatives for when a PHP script is run: l l
If web server rewrites are enabled in the Magento system and supported by the server, the PHP script is run only when the requested media is not found in the web server file system.
If web server rewrites are disabled in the Magento system or not supported by the server, the PHP script is run in any case, even when the required media exists in the file system of the web server.
You can configure web server rewrites in System > GENERAL > Web > Search Engine
Optimization > Use Web Server Rewrites.
Using a Content Delivery Network
Storing media files in a CDN is another alternative supported in Magento. There is no full integration with a specific CDN, and you are responsible for choosing and configuring a CDN on your own. After configuring the CDN, you must complete the
Magento Community Edition: User Guide
Chapter 60: Alternate Media Storage Using a Content Delivery Network configuration from the Admin. The changes can be made at either the global or website level.
To configure a content delivery network:
1.
On the Admin menu, select System > Configuration .
2.
In the panel on the left, under General, select Web .
3.
Set the Current Configuration Scope as needed.
4.
Click to expand the Unsecure section. Then, do the following:
Unsecure a.
Change the value of the Base Media URL .
b.
Change the value of the Base JavaScript URL .
5.
Click to expand the Secure section.
Secure a.
Change the value of the Base Media URL .
b.
Change the value of the Base JavaScript URL .
6.
When complete, click the Save Config button.
Magento Community Edition: User Guide 669
Using a Content Delivery Network Chapter 60: Alternate Media Storage
Accessing Media from a CDN
When a CDN is selected as media storage, all paths to media on the web store pages are changed to paths to the CDN. Retrieving media that is stored in a CDN works as follows: l l l
When a customer opens a page in the store, the browser addresses the CDN with the request to acquire some media files, such as images.
If the CDN does not yet have these images in its storage, it requests them from the server, and provides images to the customer’s browser.
If the CDN already has the required images in storage, it simply serves the requested images to the customer's browser.
Important! When a CDN is used as media storage, JavaScript may not function properly if the CDN is not in your subdomain. This is a browser security feature.
670 Magento Community Edition: User Guide
advertisement
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
advertisement
Table of contents
- 19 Getting Started
- 21 Chapter 1: Welcome to Magento!
- 22 Resources
- 24 Join the Conversation!
- 27 Chapter 2: Installing Magento
- 28 System Requirements
- 29 Part I: Magento Installation
- 38 Part II: Magento Installation
- 42 Reinstalling Magento CE
- 42 Staging Environment
- 43 Chapter 3: Your Magento Account
- 44 Sharing Your Account
- 47 Chapter 4: Quick Tour
- 47 Your Storefront
- 48 Customer Journey
- 50 Attract New Customers
- 51 Engage Your Customers
- 52 Increase Average Order Value (AOV)
- 54 Moment of Purchase
- 55 Customer Retention
- 56 Loyalty & Advocacy
- 57 Success!
- 59 Basic Configuration
- 61 Chapter 5: Store Admin
- 62 Admin Login
- 62 Message InBox
- 66 Dashboard
- 67 Admin Menu
- 70 Admin Tools
- 71 Global Record Search
- 72 List Controls
- 74 Actions Control
- 74 Selecting Records
- 74 Checkbox States
- 79 Chapter 6: Multiple Sites, Stores & Views
- 79 Setting Up Store Hierarchy
- 81 Configuration Scope
- 85 Chapter 7: Store Information
- 86 Locale Options
- 87 States Options
- 88 Countries Options
- 89 Currency Setup
- 91 Shipping Settings
- 93 Store Email Addresses
- 95 Contact Us
- 97 Chapter 8: Industry Compliance
- 98 PCI Compliance Guidelines
- 99 Privacy Policy
- 100 Cookie Law Compliance
- 100 Cookie Restriction Mode
- 103 Google Analytics Cookies
- 105 Product Catalog
- 107 Chapter 9: Navigation by Category
- 108 Top Navigation
- 109 Breadcrumb Trail
- 110 Layered Navigation
- 111 Filterable Attributes
- 112 Price Navigation
- 113 Iterative Splitting
- 114 Creating Categories
- 117 Modifying Categories
- 118 Root Categories
- 120 Hidden Categories
- 121 General Information
- 122 Display Settings
- 124 Custom Design
- 125 Category Products
- 127 Chapter 10: Managing Attributes
- 128 Attribute Input Types
- 129 Creating Attributes
- 132 Deleting Attributes
- 132 Creating an Attribute Set
- 134 Attribute Quick Reference
- 136 Attribute Properties
- 139 Attribute Frontend Properties
- 141 Chapter 11: Flat Catalog
- 142 Flat Catalog Configuration
- 145 Chapter 12: Creating Products
- 146 Product Types
- 148 Simple Product
- 153 Grouped Product
- 156 Configurable Product
- 163 Virtual Product
- 166 Bundle Product
- 171 Downloadable Product
- 177 Downloadable Product Configuration
- 179 Chapter 13: Product Information
- 180 General
- 183 Meta Information
- 184 Recurring Profile
- 189 Design
- 190 Gift Options
- 191 Websites
- 192 Categories
- 193 Related Products
- 194 Up-sells
- 195 Cross-sells
- 196 Custom Options
- 199 Chapter 14: Inventory
- 199 Inventory Configuration
- 201 Managing Stock
- 204 Stock Availability
- 206 Stock Availability Message Scenarios
- 206 Product Page Messages
- 207 Catalog Page Messages
- 208 Out of Stock Threshold
- 209 Product Alert Configuration
- 209 Product Alerts Run Settings
- 210 Managing Stock for Configurable Products
- 213 Chapter 15: Product Images
- 213 Thumbnail Gallery
- 214 Light Boxes and Sliders
- 214 Image Zoom
- 215 Image Size and Type
- 216 Adding Product Images
- 218 Placeholders
- 219 Watermarks
- 220 Shopping Cart Thumbnails
- 221 Chapter 16: Product Pricing
- 223 Special Price
- 224 Tier Price
- 226 Minimum Advertised Price (MAP)
- 227 Global Configuration
- 231 Product Group Price
- 232 Group Price Examples
- 233 Group Price Attribute
- 235 Search & SEO
- 237 Chapter 17: Storefront Search Tools
- 238 Quick Search
- 239 Advanced Search
- 241 Search Results
- 244 Popular Search Terms
- 245 Catalog Search Configuration
- 247 Chapter 18: Managing Search Terms
- 247 Adding Search Terms
- 251 Chapter 19: SEO Best Practices
- 252 Meta Information
- 253 Sitemap
- 254 Catalog URL Options
- 254 Dynamic URL
- 254 Static URL
- 255 URL Key
- 255 Store Code
- 256 HTML Suffix
- 256 Category Path
- 258 Dynamic Media URLs
- 260 Canonical Meta Tag
- 263 Chapter 20: Managing URL Rewrites
- 263 Automatic Product Redirects
- 265 Creating URL Rewrites
- 266 Creating a Product Rewrite
- 268 Creating a Category Rewrite
- 270 Creating a Custom Rewrite
- 275 Marketing
- 277 Chapter 21: Promotions
- 278 Product Relationships
- 279 Catalog Price Rules
- 284 Price Rule with Multiple SKUs
- 285 Shopping Cart Price Rules
- 296 Coupon Codes
- 298 Auto-Generating Coupon Codes
- 299 Exporting Auto-Generated Coupon Codes
- 300 Tracking Coupon Usage
- 301 Free Shipping Promotion
- 304 Buy X Get Y Free
- 305 Discount with Minimum Purchase
- 311 Chapter 22: Shopping Tools
- 312 Wishlists
- 313 Wishlist Configuration
- 314 Compare Products
- 317 Recently Viewed/Compared Products
- 318 Product Reviews
- 318 Writing Product Reviews
- 319 Moderating Reviews
- 320 Custom Ratings
- 321 Tags
- 322 Products Tagged by Administrators
- 323 Moderating Tags
- 324 Tag Activity
- 324 Polls
- 326 Editing a Poll
- 327 Email a Friend
- 328 Gift Options
- 328 Gift Options Configuration
- 331 Chapter 23: Newsletters
- 332 Newsletter Configuration
- 333 Newsletter Templates
- 334 Newsletter Queue
- 335 Chapter 24: Sales Channels
- 335 Social Marketing
- 335 Facebook Open Graph
- 339 Setting Up RSS Feeds
- 341 Chapter 25: Mobile Apps
- 341 Creating a Mobile App
- 350 Managing AirMail
- 351 Creating a Message Template
- 352 Message Queue Management
- 355 Chapter 26: Google Tools
- 355 Google Merchant Center
- 360 Google Sitemap
- 364 Google Analytics
- 367 Google Shopping
- 369 Content Elements
- 371 Chapter 27: Mastering Magento CMS
- 371 CMS Menu
- 373 Chapter 28: Content Pages
- 373 Core Content
- 375 Creating a Page
- 378 Using the Editor
- 379 Inserting a Link
- 380 Inserting Images
- 381 Adding a Widget
- 385 Chapter 29: Static Blocks
- 386 Creating a Static Block
- 387 Positioning Blocks
- 387 Block References
- 391 Chapter 30: Widgets
- 391 Widget Types
- 392 Creating a Widget
- 395 CMS Static Block Widget
- 396 New Products List
- 400 Mini Shopping Cart Widget
- 403 Chapter 31: Variables
- 403 Predefined Variables
- 405 Custom Variables
- 407 Chapter 32: Layout Updates
- 408 Placing a Block with a Layout Update
- 409 Controlling Block Order
- 410 Standard Block Layout
- 412 Layout Update Syntax
- 415 Layout Update Examples
- 417 XML Load Sequence
- 417 Default Layout
- 417 Changes to Specific Pages
- 419 Chapter 33: Markup Tags
- 421 Using Markup Tags in Links
- 423 Design & Theme
- 425 Chapter 34: Your Store Design
- 425 Your Store Logo
- 426 Changing the Welcome Message
- 427 Store Demo Notice
- 429 Chapter 35: Page Layout
- 429 Page Layout Variations
- 431 Page Layout Examples
- 431 1 Column Layout
- 432 2 Columns with Left Bar
- 432 2 Columns with Right Bar
- 433 3 Columns
- 434 Uploading a Favicon
- 437 Chapter 36: Page Configuration
- 437 HTML Head
- 439 Header
- 440 Page Footer
- 441 Chapter 37: Your Store’s Theme
- 441 Responsive Web Design
- 442 Using the Default Theme
- 443 Exceptions
- 443 Technical Information
- 444 Code Location
- 445 Installing a New Theme
- 449 Customers
- 451 Chapter 38: Customer Accounts
- 451 Account Dashboard
- 455 Chapter 39: Customer Groups
- 457 Sales & Orders
- 459 Chapter 40: Managing Orders
- 460 Order Process Overview
- 461 Chapter 41: Assisted Shopping
- 462 Online Customers
- 463 Create an Order
- 467 Update an Order
- 469 Create a Customer Account
- 472 Update a Customer Account
- 473 Persistent Shopping Cart
- 473 Types of Cookies
- 474 Cookie Scenarios
- 475 Cookie Workflow
- 478 Terms and Conditions
- 481 Chapter 42: Order Fulfillment
- 482 Order Workflow
- 483 Order Status
- 484 Custom Order Status
- 486 Invoice an Order
- 489 Print Invoices
- 490 Ship an Order
- 491 View Shipment Detail
- 491 Packing Slips
- 493 Shipping Labels
- 500 PDF Printouts
- 500 Customer Address Formats
- 502 Examples
- 503 Chapter 43: Store Credit and Refunds
- 504 Product Return Workflow
- 505 Create a Credit Memo
- 509 Print a Credit Memo
- 511 Payments
- 513 Chapter 44: Basic Payment Methods
- 514 Merchant Location
- 514 Bank Transfer Payment
- 516 Cash On Delivery
- 517 Check / Money Order
- 519 Purchase Order
- 520 Zero Subtotal Checkout
- 522 Saved Credit Cards
- 525 Chapter 45: PayPal Payment Solutions
- 525 PayPal Express Checkout
- 525 All-In-One Solutions
- 526 Payment Gateways
- 526 PayPal Business Accounts
- 527 PayPal Payments Advanced
- 527 Merchant Requirements
- 527 Configuration
- 527 Checkout Workflow
- 528 Order Processing Workflow
- 528 PayPal Payments Pro
- 528 Requirements
- 528 Configuration
- 528 Checkout Workflow
- 529 Order Processing Workflow
- 529 PayPal Payments Standard
- 530 Merchant Requirements
- 530 Configuration
- 530 Checkout Workflow
- 530 PayPal Express Checkout
- 531 Requirements
- 531 Configuration
- 531 Checkout Workflow
- 532 Save Customer Billing Address
- 533 Manage Order Transactions
- 533 Payment Action Set to “Order”
- 534 Bill Me Later
- 537 Billing Agreements
- 538 Workflow
- 538 Create Billing Agreement from Customer Account
- 539 Create Billing Agreement with Order
- 540 Managing Billing Agreements
- 540 Create Sales Order with Billing Agreement
- 540 Settlement Reports
- 542 View a Settlement Report
- 543 PayPal Payflow Pro
- 543 Customer Workflow
- 544 Order Processing Workflow
- 544 PayPal Payflow Link
- 544 Customer Workflow
- 545 Order Workflow
- 546 PayPal Payment Solutions by Country
- 549 Chapter 46: Payment Solutions & Gateways
- 549 Worldwide
- 550 Europe
- 551 Oceania
- 551 Authorize.Net
- 552 Direct Post Method
- 556 Admin Workflow
- 556 Customer Workflow
- 557 Partial Authorization with Authorize.Net
- 557 Customer Workflow
- 559 Admin Workflow
- 559 Partial Authorization Refunds
- 561 Chapter 47: Payment Services
- 561 3D Secure Credit Card Validation
- 564 3D Secure Customer Workflow
- 565 Shipping
- 567 Chapter 48: Basic Shipping Methods
- 568 Shipping Settings
- 569 Flat Rate
- 570 Free Shipping
- 572 Table Rates
- 577 Price v. Destination Example
- 578 Online Rates
- 579 Chapter 49: Shipping Carriers
- 580 Package Type by Carrier
- 580 FedEx
- 581 UPS
- 582 USPS
- 583 DHL
- 585 Chapter 50: Shipping Labels
- 585 Workflow
- 586 Shipping Label Configuration
- 588 Generate Shipping Labels
- 590 Create Packages
- 593 Change Product Quantities in Package
- 593 Print Labels for Multiple Orders
- 593 Tracking Numbers
- 595 Taxes
- 597 Chapter 51: Managing Taxes
- 597 Tax Resource Permissions
- 597 General Tax Configuration
- 602 Tax Classes
- 602 Product Tax Classes
- 603 Customer Tax Classes
- 603 Tax Zones & Rates
- 605 Tax Rules
- 607 Cross-Border Price Consistency
- 608 Fixed Product Tax
- 608 Fixed Product Tax Calculations
- 609 Fixed Product Tax Setup
- 613 Be Careful Disclosing FPT Prices in Email
- 613 Compound Taxes
- 614 Setting Up Compound Taxes
- 617 Chapter 52: Value Added Tax (VAT)
- 619 VAT ID Validation
- 620 Setting Up VAT ID Validation
- 627 VAT Validation Customer Workflow
- 627 During Registration
- 627 During Checkout
- 628 Managing VAT Validation
- 628 VAT Number Customer Address Attribute
- 629 Disable Automatic Customer Group Change
- 630 VAT ID Validation in Customer Accounts
- 630 VAT ID Validation When Creating an Order
- 633 Store Operations
- 635 Chapter 53: Managing Email Templates
- 635 Uploading Your Email Logo
- 636 Customizing Email Templates
- 639 Email Template Configuration
- 641 Chapter 54: Managing Data Transfer
- 641 Working with CSV Files
- 641 Product CSV Structure
- 643 Customer CSV Structure
- 644 Importing Data
- 645 File Validation
- 645 Importing Product Images
- 646 Import Guidelines
- 647 Exporting Data
- 649 Chapter 55: Reports
- 649 Dashboard
- 650 Snapshot Reports
- 651 Dashboard Configuration
- 652 Running Reports
- 652 Orders Report
- 655 Refreshing Sales Report Statistics
- 656 Available Reports
- 659 Chapter 56: Admin Permissions
- 659 Creating New Users
- 661 Creating Custom Roles
- 665 Chapter 57: Security
- 665 Security Configuration
- 666 CAPTCHA
- 667 Admin CAPTCHA Configuration
- 669 Customer CAPTCHA Configuration
- 673 System Operations
- 675 Chapter 58: Index Management
- 677 Manual Reindexing
- 677 Index Modes
- 681 Chapter 59: Cache Storage Management
- 681 Clearing Caches
- 684 External Full-Page Cache
- 685 Chapter 60: Alternate Media Storage
- 685 Using a Database for Media Storage
- 686 Accessing Media from a Database
- 686 Using a Content Delivery Network
- 688 Accessing Media from a CDN
- 689 Chapter 61: Server Backups & Rollback
- 689 Creating a Backup
- 690 Roll Back Changes
- 690 Limiting Access to Backup and Rollback
- 690 Create a Backup from Magento Connect Manager
- 693 Chapter 62: Magento Connect
- 693 Updating Magento
- 695 Installing Extensions
- 697 Chapter 63: Web Services
- 697 Magento Core API Settings
- 697 WS-I Endpoint URL
- 697 General Settings
- 698 Activating Web Services
- 699 REST Roles
- 701 Appendix A: Glossary
- 713 Appendix B: Editor Toolbar
- 723 Index