Supercharge WP REST API with Google App Engine

It seems that I am pretty late here to play with WordPress REST API. It’s really super cool! Now I can think about how well and fast I can distribute or work with wordpress blog posts. Even now you can host your whole WordPress inside a static HTML page. Funny? Yea, like your HTML page will interact with your REST API json response and small JS can help you to display inside page. Then you will get 10000000x super fast blog post delivery. Trust me! It works. You will understand if you are a little techie guy.

I was thinking about if I can easily get all of my posts’s data as REST API Json response then easily I can use them wherever and whenever I want. But there must be a trick. Cause still this REST API is working from inside your main WP hosting.

But what if (IF) we can recruit some middleman who can hold data and deliver those data without even interacting with your original WordPress site. So you will save lots of money and your site’s performance will be super boosted.

I just run an experiment (I shared my experimented snippet here) with Google App Engine. Why Google App Engine? Ask that to google yourself. Google App Engine is the best solutions for ready-set-go types of app deployment with lots of features that Google maintains themselves. So I am going to write a small PHP code which will load your site’s REST API JSON data and after that rest of the request it will server from directly GAE memcache. So, more easily, if your site has 1M audience a day, then most probably you will hit your original WP site once, and 999999 user will get that data from directly App Engine (PHP app data persistent through memcache).

I just tried it and it works and I tried to do 50,000 hits and it just took few milliseconds to deliver me my wordpress site’s data from Google App Engine and I just designed a HTML page with simple JS that will load the content from my App Engine and will display inside HTML page, and you know HTML page you can serve billions user in a minute. Voila 🙂

So here is my little PHP script and also I uploaded the full GAE implementation in a GitHub repository so you can directly download, change your site’s URL and deploy to Google App Engine.

And here is the app.yaml configuration for Google App Engine

This snippets are available on GitHub. If you face any trouble and want to optimize your site and make it super-fast and stable with this types of solutions, reach me anytime at shaharia@previewtechs.com

[Solution] What should you do if you see Memory exhausted error in wordpress admin panel?

Recently I faced a very strange (to me) problem with my site that is I can’t see http://www.shahariaazam.com/wp-admin page. When I go there then I see an error something like “Fatal error: Allowed memory size of 33554432?bytes exhausted (tried to allocate 1966080 bytes) in …..“. It will make you tensed about that this error. Don’t worry. I have a solution.

But after lots of searching at last I solved it by my own brainstorming that can be strange. It’s cause because of your PHP execution memory limit.

If you are using dedicated server then you can just find your php.ini file and find ‘memory_limit’. You can change this memory_limit value to something little bigger like 64M, 256M depends on your system.

But if you are using shared hosting then you can just create a new file in your wp-admin directory of your wordpress installation. Rename that new file to php.ini and write the following code.

Now your problem is solved. Now go to yoursite.com/wp-admin and you will be able to access wordpress Dashboard homepage without any error. Happy blogging!!!

Why Joomla is favorite for Bangladeshi web developer?

?Joomla for Bangladeshi Web Developer?

I have searched a lot about this topics and also discussed with few of smart and skilled Joomla developer in Bangladesh. I am sharing the summery of this issue.

Most of the Bangladeshi webmasters are familiar with Joomla than wordpress or other CMS. They are mostly familiar with only Joomla. And most of the old aged web developers of Bangladesh are developing website in Joomla. Joomla is an old and large CMS. There are few web development training institute in Bangladesh and most of their teachers are old aged and familiar or expert in Joomla that’s why they are motivating their users to use Joomla. Even I have heard that ‘I know Joomla’ when someone meet with Job interview board. hahahaha. Just funny. Even somebody know Joomla but they haven’t any knowledge on PHP. It’s funny to me. Isn’t it?

 

Bangladeshi web developers are learning Joomla by being motivated by their senior web developers of GURU. But they never know the comparison about Joomla with WordPress or others. They are just following their senior guru.

90% of Bangladeshi web developer know Joomla because of their?senior guru?but they don’t know others. It’s one kind of de-motivation. It’s something like the following quote-

 

আমি যাহা পারি এটাই শেখো, এটা-ই সবচেয়ে ভালো.. জুমলার ক্ষেত্রেও আমাদের দেশের ওয়েব ডেভেলপাররাও তাদের শিষ্যদেরকে এটাই বলে আমার ধারনা




 

Facebook plugin for wordpress site

At last facebook has developed wordpress plugin to make everything easier for webmaster to integrate various kinds of features of Facebook. Facebook itself developed this plugin.

You can download the facebook plugin from?http://wordpress.org/extend/plugins/facebook/

Really it will be fantastic if webmaster can use Facebook plugin for their wordpress site. It will make more easiest way to interact with fans, users. I personally think Business website which is built in WordPress they can be?benefited?with this.

 

How to write Bengali in WordPress with Avro?

Write Bengali in WordPress with Avrosee the above images and to write bengali in wordpress change the ‘Encoding for pages and feeds’ from UTF-8 to?utf8_general_ci.?

[but in this case when you will share your link to facebook then it will show an error. So you can also try by setting UTF-8, then you must follow the last step..]

Now write bengali in Posts with avro or any unicode keyboard software. It will make you able to make wordpress post in Bengali.

Last step: Also in your WordPress directory find wp-config.php find

here you should replace like the following example