How to import XML backup into WordPress

Restore WordPress from database backup in XML format?- No problem!

If you engage in professional development of WP themes for the purpose of public offering on the official websites of WordPress, the theme should be checked for compliance with WordPress terms and conditions. For this official conditions also offer testing of the theme at a special database file for WP ready themes tests. The file is proposed to download at the pages with information and offers for Developers. I downloaded it: zip

Now I have a question, “How to import an XML file in WordPress”? I used to do backups of the content of my resources in SQL format and had never restoreв Vordrpess from XML files. By the way, the service Blogger (blogspot.com), also backups the contents of the blog in XML format! And to restore or transfer your blog from blogspot.com also should not be a problem!
Import XML in WordPress

  • In WP there are TOOLS, there we enter the item IMPORT
  • Cjoose file XML with database of pages, columns, posts and comments, press point WordPress and RSS (for restoring entries from RSS backup).
  • Press “Download and import file”
  • Download and import XML file

As a result, we get a blog, which now contains records and pages for testing viewing display theme: styles, headings, lists (numbered or not), tables, quotations, notes and commentary included with the disabled, the text formes and so on:

RSS

Mass replace of TITLE in WordPress

The task:
There is the site at WP, which consists of many pages, not the posts but the pages. The half od these pages has wrong title, (” – the title of the website”).

We need to replace all “-” with the titles of the pages.

 
Continue reading

RSS

WordAds of WordPress.com as an alternative to AdSense

Recently, the WordPress.com has announced the opening of the new program of service monetization, which will be an alternative to AdSense from Google. The monetization program is called WordAds, and formed the project in collaboration with Federated Media. According to the management service, bloggers have long been asked to run any program that lets them earn using their resources. Finally, this program has been created.

WordPress.com, according to leadership in the person of John Burke, resisted the introduction of advertising for a long time, but now it’s time to monetize. According to John, if AdSense is the most advanced to date way to monetize the site, it’s sad. So far, there are no specific details about what difference between banners of WordAds and banners of AdSense will be. But you can fill in a form stating why you are interested in this program (unless, of course, you are).

It is reported that the monetization program of WordPress.com is optional, so that every blogger can decide for himself, if he needs to monetize his blog on that platform or not. In general, the appearance of WordAds is not a surprise, because in October of this year the representatives from WordPress.com announced their intention to work together with companies Automattic and Federated to create a modern program of monetization of blog platform. Now, according to John, about 50 000 new blogs are based on a blogging platform of WordPress (here included both WordPress.com and WordPress.org) appear every day. As far as you can see it’s about this blog services, but not about CMS itself.

Burke has also said that users of blogging platform WordPress.com deserve better than AdSense from Google. Actually, it’s not very clear what Google annoyed with its program for webmasters to John Burke. It should be noted that in the third quarter of this year, the program AdSense (in fact, AdWords), brought Google 2,6 billion U.S. dollars. This is 27% of the total profits in the third quarter of 2011.

RSS

Why is monitoring necessary?

The main objective of the system administrator is operating a computer park and maintenance of network equipment in working condition. And this problem is difficult to solve without the constant monitoring of hosts in the network.
Monitoring of hosts is usually in the periodic functional testing of certain services, ports and protocols. The most common method is sending special ICMP requests and wait for the response to them (ping). One of the critical parameters to be monitored is a response time of the device, it depends usually on the server uptime. It allows to estimate the load of the device and the communication channels. There are many ways of host monitoring, and their choice depends on the tasks performed by the device. For example, a web-server can be applied to verification of http-protocol.
What also helps the system administrator to use website monitoring and why you should use it on a regular basis:
1. Reduction of production costs in IT. Monitoring hosts minimizes the time required to identify the problem and, therefore, allows owners to save money.
2. Improved productivity of work. Automatic monitoring of hosts, as well as services and web application monitoring can deviate from the usual for someone manually verification of network device work. This allows the system administrators save time and spend it on more important issues, for example, to increase network performance, the introduction of new software to enhance information security companies, etc.
3. Increasing customer loyalty. Customers do not go away just because of a single negative experience with the service. Typically, a user rejects the use of services because of the constant disruption of service. It is therefore important to eliminate quickly not only big failure, but little downtime. Monitoring of the network hosts will improve system stability and increase “the percentage of trust” of your customers to you.
4. Planning of the network infrastructure upgrade to increase network bandwidth. With constant monitoring, using response time of the host, you can identify bottlenecks in the network, locate the faulty equipment and promptly replace it.
Summing up some, I would say that pre-emption, prevention, timely response to problems of network equipment can save time and hassle of employees and protects against loss of profits and customers.

RSS

Amazon store is ready for the New Year.

During the dot-com boom, when no one from e-retailers is not seriously thought about the logistics, it seemed more important to attract customers and not serve them, Amazon was seriously engaged in the problem of logistics order.
Now Amazon is a versatile retail platform, they do not care anymore what to trade and to a greater extent at the expense of a flexible, scalable, and highly automated logistics integrated with the functions of storage, transport and demand management.
Continue reading

RSS

How to change the name and e-mail sender to WordPress

While sending the e-mail to admin or to those which are subscribed to the comments, WordPress put the name and e-mail, which are in your profile in the field “From”.

You can change these data in the letter without changing the profile. To do this you need to insert the following code:

function res_fromemail($email) { return ‘noreply@site.name’; }
function res_fromname($email){ return ‘Name’; }
add_filter(‘wp_mail_from’, ‘res_fromemail’);
add_filter(‘wp_mail_from_name’, ‘res_fromname’);

where noreply@site.name – is e-mail, and Name – the name which will be shown in the letter.

RSS

Switch off the attachment pages in WordPress

In WordPress it is possible to put a  link  from the picture  in the article to a separate page, where onle this image (or other media file) is hosted. This is called the attachment page. Often, however, links to these pages are placed randomly, inadvertently, instead of referring to the image itself, which can emerge and grow, for example, with beautiful effect Lightbox.

The problem is that even after you have removed a link to this page, the page attachment still continues to exist, and usually fall in the index of search engines.

To avoid this,put the line into the file attachment.php or if there is, image.php , removing all other content from this template file.

<!--?php wp_redirect(get_permalink($post--->post_parent)); ?>

As a result, if a particular page of attachments is opened, it is redirected to the very entry to which this attachment is attached.

RSS

Facebook gives $10 million for small business advertising

Facebook helps small businesses to go in a big way with the new program, which pays $ 10 million in free advertising.

The programm Facebook Marketing Solutions, which cooperates with the National Federation of Independent Business and U.S. Chamber of Commerce, will begin in the coming months. In early 2012 promises to Facebook every qualified business at least $ 50 of free advertising on Facebook.

Social network also promises to provide information on how to promote your business on Facebook. The company will send its representatives to the seminars in different cities and countries.

RSS

HighLoad server optimization – TO DO

Terms: 1 dedicated server /VPS/VDS + PHP + MYSQL
Target: Fasten server’s speed in 10-50 times minimum :)

Here is the list below, what should be paid attention at while server optimization.
There is no sense to start everything at once, it depends on concrete situation and its bottleneck.

  • Diagnosis, monitoring and profiling
    • munin
    • disks: df -h, iotop, mpstat, iostat, sar, lsof, smartctl
    • processes/data store: ps aux, top, htop, vmstat, pstree, strace, watch, free -m, lsmod
    • network: tcpdump, netstat, iptraf

     

  • OS optimization and general tips.
    • if logs aren’t necessary, it’s better turn it off.
    • FS: XFS for fast reding and big files, ext3/4 – universal
    • FS formation : relatime(or noatime), async
    • checking stability and operability dns resolve, jump to 8.8.8.8 and 8.8.4.4

     

  • Web-server frontend Nginx
    • check worker_processes, worker_connections, %events_module% (kqueue – freebsd, epoll – linux), worker_priority
    • unix sockets instead of IP sockets
    • 304 http headers at all statistics, for a month: expires 30d
    • gzip on
    • gzip_static on (ngx_http_gzip_static_module); «for i in `find ./* -type f -name ‘*.js’`; do echo $i; gzip -c -9 $i > $i.gz; done;»
    • turn off statistics logs: access_log off
    • try_files instead of «if (… !-f)»
    • fastcgi_cache
    • aio on – suport of acynchronous IO in nginx, in details
    • sendfile on – if without aio
    • open_file_cache
    • timer_resolution 100ms – reduces the frequency of the call timer function

     

  • Web-server backend PHP-FPM (forget about apach (httpd) forever)
    • php-accelarators (opcode randomizing): apc or xcache
    • communication with front-end through the unix-socket

     

  • MySQL database server at config level and log analysis:
    • analysis of the variables of the serverstatistics (tuning-primer.sh, mysqltuner, sometimes phpMyAdmin)
    • profiling slow queries (one can with mysqlsla)
    • caching of SQL-queries on the database level
    • raising the limits on file handlers into the OS, it is necessary to optimize the temporary tables in virtual memory
    • raising the limits on connection to the database server
    • expansion / Fit buffer memory for running software / data

    application-level:

    • addition of conventional, multi-columned index, and FORCE INDEX in problem table
    • waiver / review request with wildcard-characters and the reduction of full scans
    • the use of DELAYED queries, multi (batch) insert / updates, statements
    • possible instead to use php-mysql php-mysqli in a compartment with mysqlnd

    basic tips for working with mysql

     

  • Applications’ optimization
    • use  APC var-caching, or (worse) memcached / redis / nosql …
    • analysis and refinement of queries to the database
    • replacement of full-time service outside the application. For example, replacing the standard search function on SphinxSearch
    • reduce http requests to the web server, http union loanedresources, sometimes CSS sprites
RSS

Google Announces Dart: «a new language for structured web programming”

Officially Google will announce Dart at AARHUS conference, which will be held on the 11th-12th of October, 2011. Heated dispute is at English- speaking resource Hacker News. It’s already known that Google has registred the new domain DartLanguage.com (whois).

RSS