The internet has become advanced enough and hence the possibilities too have expanded beyond just browsing and downloading. With the advent of hundreds of new marketing strategies, today I'll be showing you How to Add Web Push Notification to Your WordPress Site?
A decade back, owning your own website seemed like a dream, only companies and firms used to do so, today? Every kid around the corner has his own. Similarly, just couple years back Push Notifications were one such luxury for website owners.
But today? With the help of so many third party pieces of codes and stuff, answers to questions like How to Add Push Notifications to WordPress site, have become as easy as couple clicks.
What are Push Notifications?
Before asking your questions like Best Way to Add Push Notifications to Your WordPress Site, I think it's fair of me to explain to you a bit what Push Notifications exactly are, right?
Have you ever subscribed to price-comparison websites? Which compare the price of certain products you're looking for from various websites and then display a little tab at either corner of your desktop, even when you aren't browsing any website?
Let me just show you:-
So yeah those are Push Notifications.
Why do You Need Push Notifications?
There are couple benefits you'll be getting with Push Notifications, and so it's fast taking over the traditional marketing methods.
1. Push Notifications don't need you to be browsing the Internet. They can be delivered to you directly on your Desktop /Laptop Homescreens.
2. They can also be delivered to you if you're browsing something else, watching a movie, or anything else.
3. They don't need the user to do anything! Like with E-mail marketing the user needs to open his Email account, and then from the thousands of mails, needs to click on your mail to get the information, well with Push Notifications it's not so.
4. The combination of Text+Image kind of makes the notifications clickable. If the content is good and the image you've used is lucrative enough, you're bound to get yourselves some clicks.
5. They can also be displayed on Mobile Devices!
6. A recent survey declared that Push Notifications have 51% more Open rates compared to the traditional SMS, Internet and Email methods.
How to Add Web Push Notification to Your WordPress Site:-
In order to Add Web Push Notifications to WordPress, you'd be needing a plugin (the god-solution to all WordPress Problems isn't it?)
So Go to your WordPress Dashboard, and click on Plugins>Add new
And search for OneSignal and install it.
Once you've Installed the plugin, just click on the “OneSignal” tab on the left sidebar and you'd be taken to the plugin's page.
Once you're on this page, you'd need couple API's and Key's, which I'll show in detail how to create. (Worry not it's no rocket science!)
So okay now you should head over to Add Google Services Page.
Basically just Name your project, and in the second box, give your android package a name. Don't worry the service won't be using any kind of android package, it's just a requirement for advanced users who might have different needs than us, but for us, we just need a name nothing else.
And then click on Choose and Configure Services.
The next screen would look something like this.
As you can see, there are three options out there,and you'd want to click on the “+” button that's on top of the “cloud messaging” option.
And then Click on Enable Google cloud Messaging option.
Then you'd be provided with your Server API Key and Sender ID,copy the sender ID and go to your OneSignal plugin's “configuration” tab and paste it there under “Google Project Number” tab
Step #2:- How To Make Your Blog Push Notification Ready in Easy Steps:-
So by now I gather you've your Sender ID (which is pasted in your plugin's configurations tab!) and your Server API key (which we will use later), right?
Now move on to OneSignal's Official Website, and create a free account over there.
Once you're logged in to your Free account on OneSignal, you should click on the Add a new app Tab.
A popup would come up asking you for a name, enter just about any name there and you're good to proceed.
On the next screen, you would want to select Google Chrome and Mozilla Firefox as the platforms.
And then just click on Configure. Once you do so, another popup would come up which would look something like this.
Now here's the tricky part. You can enter your URL in the URL box, and then the URL of the image you want to display with the notifications in the Default Notifications Icon URL.
Now you see the option that says “My site is not fully HTTPS”, right? And I'm considering majority of you reading this piece don't have SSL on their websites.
The bad news is that Google Chrome doesn't support Non-SSL sites, or plain HTTP sites for push notifications. Worry not that problem is solved as OneSignal will give you one of their own subdomains with the SSL certificates for this purpose.
So if you do not have SSL, just click that box, and then enter the subdomain you'd want to use, and click on save.
Done! Now for the last part!
You just need to get your OneSignal Keys, and for that, click on App Settings > Keys and ID's.
Now for the final part, just copy-paste both of these keys and paste them in your WordPress OneSignal Plugin's configurations tab.
Now just login to your OneSignal account once again, and you'd see this box. You should click on the “select SDK” option.
Now select “WordPress” from the SDKs.
Finally just click on “Test Notifications” to test if your notifications are working which they should.
You would get your notifications preview meaning you successfully setup Push Notifications for your WordPress site.
So that was all I had on How to Add Web Push Notification to Your WordPress Site folks. I made sure to use as many images and illustrations as possible.
So I doubt any step would still be confusing you, right? But if you're not getting something right, make use of the commentbox and I'm here to your aid.
Also, if this piece helped you, I wouldn't mind if you hit the share buttons.
How to Edit WordPress htaccess File?
WordPress, is the most popular Blogging CMS in the world as of now. It powers more then 25% of the total world websites! Now that, is a huge, huge number. And that also is the reason why I'm writing this piece on How to edit WordPress htaccess file.
Well, before you actually jump in and start pondering over How to Create and Edit WordPress .htaccess file or where is .htaccess file, let me make couple things clear.
See Also: How to customize WordPress themes?
I don't want you messing with something you're not sure about, so let's get sure about what exactly is the .htaccess WordPress file, right?
What is WordPress .htaccess File:-
.htaccess is the file responsible for manipulating how the Apache server handles any changes in configuration of your WordPress CMS. So now you'd be asking, What do “changes” and “configuration” exactly mean, right?
So well, your WordPress is based out of a Permalink structure, isn't it? And someone needs to handle how those permalinks would come into being, right? That's what .htaccess does, it manipulates and changes and does whatever is needed to keep the pretty permalink structure of your WordPress stable and running.
That, sounded a bit complicated, huh? Well let me give you an “English version” of what .htaccess file can do for you:-
- It can Protect your Admin Area!
- It can even put in a Password Protection for your WordPress Folders!
- Lets you hide backlinks and do some other magical tricks that might not be possible, or at least seem possible without it.
- It has the power to hide / disable your directory from being browsed. Meaning your inner system files and stuff.
- Wpconfig.php is one of the most important files to your WordPress blog, and well it can protect it!
- Oh, and you can't forget that it allows you 301 redirecting your blog in case you ever need it.
- It can even help you banning someone from checking your blog out.
htaccess file for WordPress is often ignored, most webmasters don't even use it to it's full potential and instead waste thousands of dollars on third-party tools and plugins.
While all of those tweaks and tricks and little magical stuff performed by those tools could have been achieved simply by adding one extra line of code to our .htaccess file! So yeah the potential? It's unlimited!
And some other stuff similar to that. So no doubt you're curious about how to change .htaccess file WordPress, right? Yeah, that's what I'm solving right here. Just keep reading.
See Also: How to Choose the Best WordPress Theme?
Where is .htaccess File:-
So once you know what exactly the .htacces file does, now you might proceed to something more practical like How to edit WordPress htaccess file right? But before that, you need to know where is .htaccess file don't you?
The WordPress default htaccess file is located in your Cpanel, under your WordPress Installation. (Don't worry, in the later sections I'm covering How to edit WordPress htaccess file, and there you can checkout the step by step procedure, and it's location! )
How to Edit WordPress htaccess File:-
So yeah if you wondered How to Create and Edit WordPress .htaccess file then this section covers that for you. Not just that, this section will also show you where is .htaccess file located on your server.
So, before you can actually venture into how to change .htaccess file in WordPress, let's first checkout where is .htaccess file located and then we can edit it.
Login to your Cpanel.
Once you do, click on the File Manager option, and on the next popup, select Public_Html directory.
Then, on the next page, click on the blog for which you are trying to edit the WordPress default htaccess file.
Well, you're almost there. Put a bit of pressure on your eyes and you should be able to easily spot out the .htaccess file! (See? I told you I'd answer where is .htaccess file located on WordPress, right?)
Now this is the part you've been waiting for, if you were wondering How to Edit WordPress htaccess File just right click on the file, and select edit.
A new tab will open up with a text like an editor, that is where you can edit your .htaccess file without any fuss!
So yeah that was about it ! Nothing like rocket science there right? But hey wait, you might not always find your .htaccess file in some cases, because they might be hidden!
Well, so I thought why not add a section to explain it out how to show hidden htaccess files, right?
Well in order to do that, just make sure the checkbox that says “show hidden files” when you click on the File Manager is ticked!
Just get it ticked, and you're going to have a smooth sailing!
See Also: How to Install WordPress with cPanel?
Over to You:-
The .htaccess file is of utmost importance to your blog. It might seem like a tiny bit of code but it does miracles and magic when it comes to tweaking your blog for better performance or especially protecting it.
So I'm guessing this piece solved your issues over How to edit WordPress htaccess file right? Oh, I even tried my best to explain to you where is .htaccess file and how to show hidden htaccess files.
But I get it, there still might be couple doubts arising in that curious little mind of yours, guess what I love questions. Make use of the comment box; I'm here for each and every one of them.
How to Choose the Best WordPress Theme?
A WordPress theme is what makes your website look alive. I mean if there's anything more important to your website after the Content and links, it's the design and layout. That's the reason today I'll be explaining to you How to choose the best WordPress Theme.
Now you might be arguing that Google doesn't have eyes, or it doesn't feel, so why should you bother getting the perfect one? Well as a matter of fact, there “Nothing” more important to Google, well yeah atleast as it seems to us, except User-experience. If a user comes to your website and he doesn't like your website, well Google doesn't either.
So a good theme is what makes Google fall in love with your website. But then again whenever you get a question like How to Select the Best WordPress Theme for Your Site, you most of the times confuse it with “How does my website look”. Well “looks” are just “one” factor of the theme, but they're neither the only one, nor most important. Another important aspect if you looking forward to making your blog a brand is Logo. A good attractive logo always works as the cherry on the cake. Here is how you can create a logo.
So whenever you're picking up the best theme for your website, there are couple things and factors you need to keep in your mind.
How to Choose the Best WordPress Theme:-
Ofcourse, when a user lands on the site, the first factor he'd notice is the looks and feel of the theme, right? It's not like he's gonna land and the next millisecond his brain has analysed the speed, compatibility, UI and everything else, right? So looks? They matter.
So what kind of looks you should go with? Now this is an abstract question, to which there might be as many answers are there are humans on this planet, multiplied by the number of rivers, trees and animals.
There's no “This looks is best” answer to the question. But there are certain factors which make your website look good enough.
- Simplicity:- Iron Man UI looks good on screens, not when you're using it yourselves. So yeah make sure your website is simple, clean and neat. There shouldn't be extremely complicated options or features.
- Spacing:- The text on the theme should have enough space on it, no one likes a website that has a bad fletch score (the ease of reading- It's even a ranking factor!)
- The font should be around 12 in size, minimum. Anything smaller than that stresses the eyes. In short make sure whatever's there on the screen is easily readable without a lot of second guesses.
#2:- Browser Compatability:-
This one is a major issue. Although most themes out there support all the major browsers, but chances are you might just as well fall in the “unlucky 1%” group and select a theme which doesn't support all the browsers.
Now I know you don't check the compatibility before going with a theme, and that might hurt you. What this term means is that your theme should look exactly same on all the browsers, and should be showing it's full potential.
Some themes are poorly coded, hence the website misses a section, texts get mixed up, images start resizing themselves and all kind of gothic stuff if they don't support the browser.
How to Check Browser Compatability:-
There's no tool for that, but the one solution I can offer you is, anytime you want to go with a theme, it offers you live demo befoe buying or downloading, right?
So what you've to do is, check the “live demo” with atleast the following browsers:-
- Google Chrome
- Internet Explorer
- Mozilla Firefox.
If the theme loads perfectly, then well it's all browser compatible.
After the Mobilegeddon last year, responsiveness isn't a luxury option anymore. Instead it's a strict ranking factor! Well Responsiveness is the term that means “is your website easily compatible with Mobile and Tablet devices or not”.
In short, our computer screens are large in size, right? Around 10x compared to average mobile devices. So what a responsive theme needs to do is, it automatically resizes it's elements, the images, text size etc according to the device. If you don't know the very basics of creating a website, here is how to create a Website.
So that the “layout' isn't altered, just the size of the elements are, and the theme still looks exactly the same as it does on computers.
How to Test Mobile Friendliness of your Website?
Go to this Test Page from Google, and enter your URL.
Couple seconds later, you'd get to know what Google thinks about your website.
So yeah either make your websites responsive, or forget about SERP's.
#4:- Plugins Support:-
WordPress isn't half as awesome in itself, well yeah face the truth. It's Good, no doubt, but all those super awesome security levels and layout options aren't in-built in it.
Instead those are the magic spells from the Plugins! Plugins are external third-party tiny bits of codes which enhance and add features and options to your WordPress website.
Now the problem is, not all themes have love for the Plugins. Meaning, there are couple themes which don't support external plugins.
How to Check Plugins' Support?
There's no tool to do so either. The only way is, before you buy a theme or download it, make sure you check the reviews. If the theme is being selfish, there is 99.99% chance that someone has already mentioned this mischief in the reviews.
And the second option is to directly mail the developers and ask them if they support external plugins or not.
#5:- SEO Optimization
You just can't ignore this little friend here, right? A website without SEO? It's like a body without a soul. There's no purpose to it. Well SEO is what gets you ranked, gets you traffic, gets you sales and makes you money.
So without SEO, you might as well just quit your website already! The good news is, if you're worried about How to Pick the Best WordPress Theme for Your Business, then most themes have it listed on their download page itself if their theme is SEO optimized or not.
And well 99.99% themes are optimized already! Then why did I include this point over here? I did because there are some themes which aren't. And they look super awesome, super cool, and super-blah blah blah, But you can't afford to go with them if you're serious about your website.
If you've got to choose between LOOKS and SEO, choose the worst looking theme that there is if you have to, but you can't compromise the SEO factor. Do some hit & trials before finalizing the theme. Track your traffic using Google Analytics. Here is how to use Google Analytics.
The URL structure, permalinks etc are what the theme controls. So if they're shitty, or non-customizable, don't you dare go with the theme.
#6:- Check Ratings & Reviews:-
Well this is the best way to check all the above factors in a single go!
The above factors are considered by almost all the people who have downloaded the theme, right? So checking the Ratings and Reviews of a theme directly tells you an “overall score” including all the above-listed factors.
And that makes your job a hell lot easier.
How to Analyze the Ratings?
So in particular, try to go with themes which have 4.5-5 Star ratings and enough positive comments. If not, even 4 is okay. But going with any theme below the 4 star is a mistake.
Over to You:-
So yeah I guess that answered your query that was even remotely related to How to choose the best WordPress Theme? Yeah I hoped so.
If you got any questions or query do make use of the comment box. Or got a better suggestion? Do let me know I'd love to include it over here.
How to get Star Reviews Snippet on WordPress?
Ever seen posts on Google search results with stars on them? Like rating stars and wondered how is it possible? Well that's exactly what I'll be showing you today. How to get star reviews snippets on WordPress!
Well, they are the spices of Affiliate Marketing if you ask me, now whenever a person Googles “Product X review”, there will be millions of searches, how will your page stand out? It needs to look special, right?
It not only gives your posts a better look in the SERP's, it also makes it easier for your readers to get a glimpse of what you think of the product overall. So well let's dig from the surface, meaning let me enlighten you from the very basics.
What are Star Reviews?
Yup before knowing anything else you need to know what Star reviews are, right? I mean only then you'd be least bit interested in getting them or deciding if they're worth your time or not!
Star reviews are those little stars that appear on the left side of some posts on Google Search Results.
There's no boundation for them to be yellow color only. Most Best Rich Snippets & Schema Markup Plugins let you customize the color of the stars according to your own needs.
But most website owners like to keep them yellow because well that's the traditional color of how stars were colored and also how the earliest of snippet reviews came into being. So it's like keeping the trend up.
But in a nutshell, that's what star reviews are, stars on your SERP result, and web pages to give your readers an instant overall score of the product.8
Now they've two primary functions, First, they tell the visitors that you've reviews the product and have a final opinion on them. Thus they are getting a total, overall score directly from the Search Results.
Second, they boost the look and feel of your result and hence resulting in more conversions. Ofcourse your website will stand out from sites which do not have the star snippets on them, so ofcourse people would like to go with your reviews.
And finally the third one that comes in is that people are likely to buy a product from your link, because Comm'n it just looks more professional, meaning it looks to have more credibility.
Best Rich Snippets & Schema Markup Plugins:-
I just told you what star review snippets were, right? Yeah right but how would you get these on your websites? It's not like you've got a Ph.d in programming skills, right?
The good news is, you don't need one. There are hundreds if not thousands of star snippet review plugins available out there in the market, and a lot of them are free. There are a lot of themes that offers the inbuilt feature of adding snippet. If you don't know how to choose the best WordPress theme, see that to learn about WordPress themes.
Now I said “schema markup plugins”! What on earth are those? Well as you already might know, plugins are extra bits of code that enhance the features and functionalities of WordPress, right?
They're light-weight, meaning they're generally less than 10mb's in size, but they extremely increase the potentialities of what's possible with WordPress.
As I always say, WordPress doesn't have a lot of awesome features, it's the plugins which make WordPress awesome, WordPress's power to support and integrate those plugins is what makes it awesome.
So yeah that's where your rich snippet & Schema markup plugins come in. These are plugins which let you have those star reviews on your website. Now, these are coded by professionals so you don't have to do a lot of things, apart from installing them.
They're already schema-rich, meaning when you rate something on your site using them, the rating would automatically appear on Google SERP pages.
How to Get Star Reviews Snippet on WordPress:-
Okay so here's what you need to do to get those star reviews on your WordPress site.
Go to your dashboard, and click on Plugins.
And then click on “Add new”
Then type “Review” in the search box on the left side.
And then you'd get a page that looks something like this.
Now that's pure goldmine! All of those plugins will do the job for you! You can go with any one of them and click on “Install”. The process will be exactly the same no matter which plugin you're going with. So yeah just do it.
Once the plugin is installed, you'd be allowed to rate and review the posts/articles/products! Wanna learn how?
How to Get Star Reviews Snippet on WordPress:-
The exact same title? Yeah, I know, but the above steps were about getting you the plugin, this section will show you how to do it! After you've installed the plugins, on the “write a new post” page, whenever you're writing a new post, you'd have this new section which will let you do what you want to. If you don't want to install any plugins, you can add custom codes in the theme. Here is how you can customize WordPress themes.
See? The “feature name” (Or something similar to it will be there with every plugin!) is where you write the name of the exact feature you're rating.
And then the “stars” is where you rate it out of 5.
The overall score is automatically calculated once you've rated 2-3 features! And then a beautiful snippet like this would be shown on the blogpost!
So yeah that was it folks on How to get Star reviews snippet on WordPress, all you've to do is, get your hands on a neat review plugin, install it, and start rating!
No rocket science over there! Infact the plugins I've shared are free, meaning the search results are mostly free so it's not like you'd be wasting any bucks on them anyway. Do you have Yoast Plugin installed? But have to setup the Yoast for the best SEO practice? Here is how to install and setup Yoast Plugin.
Hey, mind hitting the share button? Or if there's something that's going above your heads, make use of the comment box! I'm here to answer them!
How To Install WordPress Locally With MySQL
WordPress is the best platform for creating and running websites. I've been using it for almost a year now and completely love this platform!
For anyone, whether it's a novice or an expert, WordPress is the only platform I would ever recommend! The reason I love WordPress so much is its easy installation, easy navigation and being its feature rich.
WordPress offers beautiful free themes in bulks, and a lot more features are there on the WordPress, which are too easy to get! WordPress offers thousands of free plugins which are far more than any other platforms could offer.
In WordPress, you don't need to go for anything manually. For instance, if you need a contact form on your WordPress, no need to go into coding. There are many WordPress contact form plugins which you can install on your WordPress and build designer contact forms within minutes.
Similarly, there are plugins for several other features which helps you add additional features to your WordPress website. WordPress has a plugin for almost everything you can think of! From WordPress login to how to use WordPress, everything is damn easy.
Even installing WordPress is itself a task of hardly a couple of minutes. That's the reason; we have over millions of users of WordPress and the number is rapidly increasing.
If you are a novice and don't know much about WordPress installation, then you are on the right page. Today, I have compiled a guide on how to install WordPress locally with MySQL.
Albeit, WordPress takes hardly two minutes to get installed if you go for the quick installation, but in case that method doesn't work out for you, here's the solution. This guide covers the method for installation of WordPress manually.
So, shall we start??
How To Install WordPress Locally With MySQL
I am assuming that you have basic information about how a website works. You should know that to install WordPress; you should have a hosting account.
There are countless hosting providers like Bluehost, Hostgator, site ground, Dreamhost, etc. To run a website or a blog with WordPress, you need to have an account on one of the hosting providers. Along with this, what are the other pre-requisites you would require to installing the WordPress manually, have a look!
- Since we are manually installing the WordPress, we need to create MySQL database and user. For this, you'll require cPanel credentials to log in to the cPanel area.
- FTP access to your hosting account. In my case, it's Hostgator.
These are the only things you need to have, rest of the procedure I've mentioned below in the guide! The guide is compiled in the five steps. Let's have a look.
Step 1. Download the WordPress
The first step is to download the latest version of WordPress on your computer. For this, go to the official website of WordPress and install the WordPress package on your computer.
Navigate through it, right-click on it and extract or unzip the zip file in the new folder.
Step 2. Upload WordPress to the Hosting account.
Once we have WordPress downloaded, its time to upload on the server. There are three different ways you can do this. First one is by FTP upload; second way go through the file manager, and third way is uploading it by SSH.
You don't need to go into the details of all three of these. We will follow here the second method i.e. via File Manager. In order to do that, you need to login to your hosting account. Once done, follow the below steps.
- Go to cPanel.
- Scroll all the way down to Files. Now under Files, click on File Manager.
- You'll be prompted with File Manager directory selection. Select Web Root(public_html/www) and check Show Hidden Files, and then click Go.
- Now click on Upload and navigate through the WordPress.zip file you downloaded in step 1 and extract it.
Step 3. Create MySQL Database and User
Now the step involves the creation of Database and user. Let's see how to do it.
- Go back to the cPanel again.
- Under Database, click on the MySQL Database Wizard.
- As sooner you do this, you will be required to enter the name of the database. Enter here any name which you can remember for the future and click on Next.
- In the next step, you need to create the user of your newly created database. Enter the database user name and password and click Create User.
- Once done, you need to assign privileges to the user. Select ALL PRIVILEGES and go to the Next Step.
- Now note down all the details since you'll require them in the next Step.
Step 4. Configure wp-config.php and Run the installation
Now you need to do some wp-config.php configuration. It's an important step and needs to be done very carefully. Here's what to do.
- Login to cPanel> Files> File Manager.
- Now select the directory Web Root(public_html/www) and check Show Hidden Files, then click on Go.
- Now on the public_html directory, you'll see a file named wp-config-sample.php. Right-click on it, select Rename and change the file name to wp-config.php.
- Once done successfully, right-click again on the file wp-config.php and select Code Edit.
- You'll see the following code.
/** MySQL database username */ define('DB_USER', 'username_here');
/** MySQL database password */ define('DB_PASSWORD', 'password_here');
Now replace database_name_here, username_here, password_here to your database name, username and password which you created in step 3.
- Once done, click on the Save Changes button.
- Now open a new tab in your browser and type the URL- http://yourdomainname.com/wp-admin/install.php (replace your domain name with the domain name of your website). You'll see a page saying “Welcome to the famous five minute WordPress installation process!”.
Step 5. Complete the Installation
Till the above steps, we have reached to the quick installation process. Rest of process is going to take hardly 2 minutes.
- First of all, select the language of your website i.e. English or the language you want your website to be in.
- Now next and the last step is to fill the required information like your Site name, username, password, email address, etc.
- Once done, click on Install Now button.
- That's it. As sooner you click on Install now button, you'll see a success message, and your blog will be up and running.
I hope you learned everything about how to install WordPress! I suppose the guide will be useful to you. For any queries or doubts, feel free to comment!
How To Increase php Memory Limit In WordPress
If you are WordPress user and seeing a PHP memory limit error message on your dashboard while downloading any new plugin, upgrading your WordPress version or performing other tasks, then a solution to your problem is given below in the guide.
The message may look something like,
“Fatal Error: Allowed memory size of *** bytes exhausted(tried to allocate **** bytes) in /home4/xxx/public_html/wp-includes/plugin.php on line xxx”
WordPress is usually the best platform to run websites and blogs. It provides all the necessary resources to run the website smoothly. But in some exceptional cases, you may encounter this error. You can easily create a website and these kind of errors are not a big deal.
We usually get up a sufficient amount of memory from WordPress to install a number of plugins without any problem. But when we install large sized plugins and files to an extent, that it reaches to the maximum memory limit offered by WordPress, then such a situation occurs.
Now the question arises how to resolve such errors?? Well, don't panic! There a number of ways to PHP set memory limit and resolve this problem.
I'll try to cover few of them here. The problem might seem big, but the solution is very easy. Yes, it would hardly take your two minutes if you have been on your hosting account before.
But if you have never logged into your hosting account and have never tried your hands on your cPanel, it might seem little tricky to you! Well, whatever it is, we will only get to know once we will move to the guide, so are you ready??
Let's see what are the steps involved!
How To Increase PHP Memory Limit in WordPress
Before getting on to our guide, let me inform you that it involves a bit of coding skills. If you have got that, then the guide might help you.
But in case, if you are a complete novice, then beware, things might get messy to you. In that case, the best solution for you is to contact your hosting provider and talk to them about the error.
Since you have paid them, it's your right to get the things done right. But, if you know the little bit of coding, then I will suggest read the guide below and resolve the issue, it will take less time than contacting the customer executive and get the things done.
So let's get started with the methods.
#Method 1. Increase Memory limit via wp-config.php
This is the best yet easiest way to resolve memory limit error. In this method, you just need to go to the wp-config.php file on your server and add a line of code there. Here's how to do that,
- Login to your hosting account.
- On your cPanel, scroll all the way down to Files.
- Now under files, click on the File Manager. You'll be prompted with the following window.
- Now select Web Root(public_html/www) and Show Hidden Files. Now select the domain which is having the error(In case there are multiple domains hosted on your hosting), and then click Go.
- Now on the left side, you'll see a long list of files in the public_html directory. There, you need to search for the file wp-config.php.
- Once found, select the file by clicking on it and click on the code editor on the top of the screen. If you can't find the option, a screenshot for the same is given below.
- In wp-config.php editor file, just add the following command,
That's it! Once you do this, memory limit on your WordPress would be increased and you no longer have to bear this error.
#Method 2. Increase Memory limit via PHP.ini file
The second method is similar to the above method. But this time, we need to tweak the php.ini file. You can increase the memory limit of your WordPress by adding the command memory_limit = 64M into the php.ini file.
But there is a problem. Not all the hosting providers allow you to access php.ini file. Some hosting providers might allow you to create a duplicate file of php.ini and the same named file will overwrite the previous file. This way you can edit that file.
But some hosting providers don't even allow to create the duplicate file. In that case, others methods need to be followed. So, if you don't get php.ini file on your WordPress, go for other methods.
#Method 3. Increase Memory limit via .htaccess file
The third way to increase the memory limit is by .haccess. If you have a newly created hosting and WordPress account, probably you won't have this file on your server.
In order to add the command to exceed the limit of your WordPress memory, you'll have to create this file. Once done, just add the following command line into .htaccess file,
php_value memory_limit 64M
This command will maximize the memory limit to 64MB. If you want even more memory, just replace the number 64 to 96M, 128M etc and your memory error would be resolved.
For those, who don't know how to create a file on the hosting account, just follow the below steps
- Open the directory, where you want to create the file.
- Click on the New File option on the top left in the corner.
- Write the name of the file and click on the Create New file button, the file would be created.
#Method 4. Increasing Memory limit via install.php
Now coming to the last method i.e increasing the memory via install.php file. For this, find the wp-admin folder on your server. There, you'll see a file called install.php.
You need to open this file in the code editor and add the following command line. Once done properly, it will cause the memory increase in WordPress and the issue would be resolved. The command is,
That's it for the guide! With this, I'll have to wrap up the article. If you own a website then you must be aware of DDoS attacks. Here is how to protect website from DDoS attacks.
Now use any of the method mentioned above and get the PHP memory limit error resolved. It's that easy!
I hope, the guide helped you to get the things done. And in case, if you still can't solve the issue and the problem persists, please contact your hosting provider via live chat or contact form!
And don't forget to tell us how did you like the guide and which method you found easy? And if you know any other better way, mention in the comments section below.
Mac11 months ago
How to Install GIMP for Mac
Tips11 months ago
How to Change Language in Google Chrome?
Tech10 months ago
How to Make a Yahoo Account Without a Phone Number?
Linux9 months ago
How to Install Zorin Linux using Bootable Pendrive
Computers11 months ago
How to Get Moviebox For PC?
Windows11 months ago
How to Assign a Static IP Address in Windows 7, 8, 10 or XP?
Tech11 months ago
100 Proxy Sites to Unblock Any Website Anywhere
Tips11 months ago
How to Switch from Aol to Gmail?