hanya seorang newbe

Archive for the ‘wordpress utak-atik’ Category

What is a WebHook and how to implementing

What is a WebHook?

The concept of a WebHook is simple. A WebHook is an HTTP callback: an HTTP POST that occurs when something happens; a simple event-notification via HTTP POST.

A web application implementing WebHooks will POST a message to a URL when certain things happen. When a web application enables users to register their own URLs, the users can then extend, customize, and integrate that application with their own custom extensions or even with other applications around the web. For the user, WebHooks are a way to receive valuable information when it happens, rather than continually polling for that data and receiving nothing valuable most of the time. WebHooks have enormous potential and are limited only by your imagination! (No, it can’t wash the dishes. Yet.)

WebHooks are meant to do something. To get your imagination spinning with your own ideas, here are the three general ways in which WebHooks can be used to make your web more programmable:

Push: receiving data in real time

Push is the simplest of reasons to use WebHooks. As was just stated above, no more polling every couple of minutes to find out if there is new information. Just register a WebHook and receive the data at your doorstep as soon as it exists. It’s less work, less hassle, and you’ll probably even receive it sooner than if you were asking for it every couple of minutes.

Pipes: receiving data and passing it on

A Pipe happens when your WebHook not only receives real-time data, but goes on to do something new and meaningful with it, triggering actions unrelated to the original event. For example, you create a script, register its URL at a photo site, and have it email you when your mother posts a new photo. Or make a script that creates a Twitter message, and have it triggered by a WebHook whenever you add a new product on your commerce website.


Plugins: processing data and giving something in return

This is where the entire web becomes a programming platform. You can use this form of WebHooks to allow others to extend your application. Facebook’s Application Platform uses WebHooks in this way, and so does Google Wave’s robot integration. The general idea is that a web application sending out data via WebHooks will also use the response to modify its own data. At Facebook, when you access an app, Facebook sends a WebHook out to your application saying “Hey, someone’s accessing your application, what do I do?!” The application responds with, “Show the user this page…” Facebook does so, and the pattern continues in the same manner as you continue to use the application. At Google Wave, when you do something in a wave, any robot you’ve added as a participant is notified via a WebHook, and the robot has the ability to modify the wave in its http response. Implement WebHooks in this way in your application if you want to allow others to truly extend and enhance the abilities of your application.


How do they work?

By letting the user specify a URL for various events, the application will POST data to those URLs when the events occur. With the cheap availability of PHP hosting and even easier simple app/script hosting like AppJet or Scriptlets, handling the POST data becomes fairly trivial. How you use it is up to you and whatever you want to accomplish. Among other things, you can:

* create notifications to you or anybody via email, IRC, Jabber, …
* put the data in another app (real-time data synchronization)
* process the data and repost it using the app’s API
* validate the data and potentially prevent it from being used by the app


Why should I care?

As integrated as we perceive the web, most web applications today operate in silos. With the rise of API’s we’ve seen mashups and some degree of integration between applications. However, we have not seen the vision of the programmable web: a web where you as the user can “pipe” data between apps much like the Unix command line. Some say RSS is the answer. They are wrong. The heart is in the right place, but the implementation is wrong. RSS is still useful, but it is not going to bring us the true programmable web.

We just need a simple way to get data out in real-time to let the user easily do whatever they want with it. That means no polling, no content constraints, and no XML parsing. That means no RSS. Using HTTP is simpler and easier to use. PHP is a very popular and accessible programming environment, so it’s likely to be used often for writing hooklets… getting data from a web POST in PHP is as simple as $_POST[‘something’]. And making the request to the user script is as simple as making an HTTP request, something already built-in to most programming environments. In fact, web hooks are easier to implement than an API.

However implemented (although the easier the more likely it will be adopted), having an output for the web will complement the input provided by the rising adoption of API’s. When you have both input and output, you have everything you need for apps to easily interact. This will encourage smaller, more focused apps that together with hook-enabled heavier apps will let amazing emergent creations happen!

How do I implement WebHooks?

Simply provide your users with the ability to submit their own URL, and POST to that URL when something happens. It’s that simple. There are no specs you have to follow.

Cara Aman Setting Plugin WP Super Cache mudah ter index spyder

Bingung setting wp super cache agar tidak mengganggu spyder yang akan meng crawl web kita? permasalahan ini sudah saya temui sejak mulai menekuni perguruan perbloggingan.:D heheh gak dink,

mau tau tips nya??

nie..

Caching of your wordpress files is very important to reduce the server and database load, especially in shared hosting scenarios. WP-Supercache, the next generation of WP-Cache is a powerful wordpress caching plugin.

WP-Cache 2 is a popular plugin that caches the pages of your WordPress blog and delivers them without accessing the database, but it still means loading the PHP engine to serve the cached files; WP Super Cache gets around that by generating html files that are served without invoking a single line of PHP!

WP-Cache had problems working on this blog and always ended up bringing the site down. After this site overloaded servers, I had to try installing WP-supercache to see if might work. The installation and activation went without a hitch, the blog was loading fine, but no pages were being cached!

WordPress Super Cache Not Working?

I looked up the Troubleshooting page and here is the checklist.

  1. Is wp-content writable by the web server?
    Yes. Looked for file permissions. All OK
  2. Is there a wp-content/wp-cache-config.php ?
    I deleted it earlier as preinstallation task (earlier installed by WP-cache). This was created there when plugin activated.
  3. Is there a wp-content/advanced-cache.php ?
    I was unable to delete this linked file via FTP as a preinstallation task (earlier installed by WP-cache). But it was still there.
  4. Make sure the following line is in wp-config.php define( 'WP_CACHE', true );
    This entry was deleted from wp-config.php as a preinstallation task (earlier installed by WP-cache) and now it was recreated back in the same place.
  5. Try the Options->WP Super Cache page again and enable cache.
    Done. OK. But the status is still same.
  6. Look in wp-content/cache/supercache/…
    Something wrong. No files there. No folder there.
  7. Anything in your php error_log?
    No.
  8. If your browser keeps asking you to save the file…
    Well Super Cache compression was disabled by default in the options and browser asked nothing.
  9. The plugin does not work when PHP’s safe mode is active.
    Ok. No problems.
  10. Your blog can be viewed with and without the “www” prefix.
    Blog set to view as www. No problem there.

Fix WP-Super-Cache Problems

Then I went about checking and here are the few tips that worked for me, and might work for you too.

1. No Supercache Folder – In #6 supercache folder was missing, so I had to manually create the folder as it was not there. I used FTP to login to my server using Filezilla and created wp-content/cache/supercache/. But still not working.

2. Change Settings – I tried working in HALF ON (Super Cache Disabled) mode, Super Cache Compression on and off mode, checked the .htaccess files for correct mod_rewrite rules (important to check!), but nothing worked.

2. Deleting advanced-cache.php. Then I realized that in #3, I was unable to delete advanced-cache.php. Though I believed the installation had rewritten on the linked file, it might have not.

The ealier wp-cache file was linked to wp-cache/wp-cache-phase1.php
but the supercache file should link to wp-super-cache/wp-cache-phase1.php

I thought this was the problem. But I was unable to delete it via FTP. So I used my newly acquired SSH skills and use PuTTY to get in and delete the file.
cd wp-content
rm advanced-cache.php

and the file was finally deleted. Disable and Activate the plugin, it generated a new advanced-cache.php with the new shortcut. I could have also tried
ln -s plugins/wp-super-cache/wp-cache-phase1.php advanced-cache.php

Guess what…. it started to work!!!

If that does not help you, look up the wordpress forums for more support.

ato ksini aja original article

tips cara cepat pindah hosting wordpress 100% aman,tanpa error

pindah hosting menggunakan wordpress sebenarnya gampang , tips tips nya sebenarnya banyak baget sih versinya, di google.heheehe. tapi tips pindah hosting yang satu ini berdasarkan pengalaman pribadi dan berhasil 100% lho. tenin gak boong..

tak crita dulu ya, awlnya aku pindah hosting karena suebel baget ma hosting yang lama, hosting mbayar kog sering banget down servernya, mana seringnya pas malem malem lagi,

trus pertanyaan yg muncul knapa malem-malem malah ribut pak?mbok yo gek sare ke mawon.

jadi gini, berhubung target visitornya bukan di indonesia,jadi ya gt dech,pasharusnya traffic gede dateng malah ga idup tu website.

oke lah kembali ke masalah pindah hosting yang aman 100%.

pertama siapkan segelas kopi dan rokok secukupnya,bwt jaga jaga kalo koneksinya tar lemot:D

oke ini beneran..uhhm uhhm

  • Masuk ke control panel hosting lama/hosting yang mau dipindah, kemudian masuk ke menu database MySQL > phpMyAdmin, klik link Export (beda tampilannya karena beda hostingnya, intinya sih tetep sama,)tips pindah hosting wordpress 100% aman
  • Select semua database, kemudian di menu save as file di bawah beri nama apa saja, saya biasanya pilih zipped untuk compression file, klik Go maka file database akan ter-download otomatispindah hosting wordpress aman sql2
    Selanjutnya download semua file di hosting lama ke harddisk komputer anda, anda bisa gunakan software FTP sepeti WS_FTP, CuteFTP, dll,igat..semuanya lho ya,,semua file yg di dalam root atau htdock atau public.htmtips pindah hosting wordpress2

Buat database baru di account hosting baru anda, coba anda cari menu untuk membuat database baru di account hosting anda, karena tidak semua web hosting menu pembuatan database-nya sama. Yang perlu anda catat dari data base baru adalah : Database name, database user, database password, database Hostname.

5. Buka file database hasil export (langkah 2) dengan program notepad. Jika file dalam bentuk zip silakan diekstrak dulu, jika text terlihat acak-acakan coba text dimasukkan ke microsoft word dulu. Kemudian cari tulisan CREATE DATABASE (gunakan find) jika anda menemui tulisan semacam ini : CREATE DATABASE harus dihapus, tidak boleh ada perintah CREATE DATABASE di file database yang akan diimport. Save file yang telah diedit tersebut.

6. Masuk ke phpMyAdmin database di hosting baru yang telah dibuat (langkah 4), cari menu Import kemudian import file database dari hosting lama yang telah diedit (langkah 5)

7. Buka file wp-config.php dari file hasil download (langkah 3) dari hosting lama menggunakan notepad kemudian edit file wp-config.php disesuaikan dengan info database yang baru (langkah no 4). Setelah diedit save lagi filenya.tips pindah hosting 3

8. Upload semua file hasil download dari hosting lama (langkah 3) dan file wp-config.php yang telah diedit (langkah 7) ke hosting baru.

9. Rubah DNS domain di control panel domain disesuaikan dengan nameserver hosting yang baru.

10. Tunggu beberapa saat (bisa mencapai 24 jam) blog wordpress akan pindah ke hosting baru tanpa melewati blog mati lebih dulu.

Faktor yang seringkali menyebabkan kegagalan pindah hosting wordpress cara di atas adalah :

  • Tidak menghapus perintah CREATE DATABASE di file database hasil export (langkah 5)
  • Pengisian info database baru di file wp-config.php yang salah (langkah 7)

Selamat mencoba pindah hosting wordpress , kalau tutorial ini ada yang salah tolong dikoreksi.

oke demikianlah …saatnya ngopi and ngroko lagi…