Where Is php.ini in WordPress? (& How to Edit This File)

Are you wondering where the php.ini file is located on your website?

Php.ini is a critical file in your WordPress installation. You’ll often need to edit it for better functionality and performance of your website. However, many website owners don’t know where it is located.

In this article, we’ll show you where is php.ini in WordPress and how to edit this file.

Where is php.ini in WordPress and how to edit it

To help you navigate the post, you can click the links below to jump to any section you’re interested in.

What is php.ini file in WordPress?

The php.ini file is a default configuration file for PHP on your WordPress site. PHP is a scripting and programming language on which WordPress is written.

It’s used on the server side of things, which means it runs on your web hosting server. Through PHP, WordPress is able to display your blog posts, products, media content, and more.

The php.ini file configures how PHP works and can have a huge impact on your website’s functionality. Whenever PHP runs on your site, it will look for this file.

That said, let’s see why and when you’ll need to edit the file on your website.

Why Do You Need to Edit php.ini File in WordPress?

The php.ini file is very important for your site’s performance and functionality. This means you can edit it to ensure your website works smoothly or resolve any errors.

For instance, editing the php.ini file allows you to increase the maximum file upload size and resource limits.

If you have a photography website or a site that requires a lot of videos and images, then you might encounter an error ‘uploaded file exceeds the upload_max_filesize’ message.

Increasing the upload size in the php.ini file will help resolve this error and allow you to easily upload larger media files. Plus, you can also increase the available memory to accommodate long blog posts with lots of images.

Check current file upload size limit

Similarly, the php.ini file lets you edit the file timeout settings. If a file takes longer to process, then your site can timeout and stop processing the request. To prevent this from happening, you can increase the number of seconds before timeout through the php.ini file.

Lastly, you’ll also be able to enable or disable file extensions in PHP by editing the file. This is really useful if you see a ‘Your PHP installation appears to be missing the MySQL extension’ error on your site. It helps fix this error and resolve issues when establishing a database connection.

Now, let’s look at where the php.ini file is located in WordPress.

Finding the php.ini File Location in WordPress

There are several ways you can locate and view the php.ini file.

You can use your hosting service’s cPanel, a plugin, or an FTP client to access your website files and folders.

1. Use cPanel to Locate the php.ini File

You can use the cPanel provided by your WordPress hosting provider and access the File Manager to locate the file. This method is pretty straightforward, and you don’t need to edit any code.

For this tutorial, we will use Bluehost to access the cPanel. If you’re using another hosting service, then the steps may vary.

First, you’ll need to log in to your Bluehost account. From here, simply click the ‘Advanced’ option in the left panel.

Open advanced settings in Bluehost

On the next screen, you’ll see the cPanel of your website.

Simply scroll down to the Files section and click the File Manager option.

Open file manager in cpanel

After that, you’ll see all the folders and files of your WordPress website.

From the left panel, you can navigate to the ‘public_html’ folder. Next, you should see files in the folder on your right. You can scroll down and locate the ‘php.ini’ file.

Locate php.ini file

To download the file for editing, you can simply right-click the php.ini file and save it on your computer.

2. Locate the php.ini File using a File Manager Plugin

Another way of finding out where is the php.ini file in WordPress is by using a plugin like WP File Manager.

It is a free WordPress plugin that lets you edit, download, delete, and organize your files and folders directly from the WordPress dashboard. You don’t have to use an FTP client or cPanel to access your site’s files.

First, you’ll need to install and activate the WP File Manager plugin. If you need help, then please see our guide on how to install a WordPress plugin.

Upon activation, you can head to WP File Manager from your WordPress admin panel.

Next, you’ll need to select the ‘public_html’ folder from the panel on the left. After that, you can scroll down and navigate to the ‘php.ini’ file.

View php.ini file in file manager plugin

Once you’ve located the file, simply right-click to download it onto your computer.

3. Finding php.ini Path in WordPress using the phpinfo.php File

You can also find the php.ini file by creating a phpinfo.php file and placing it in the root directory of your WordPress installation.

This is a slightly advanced method and is recommended for people who know how to use an FTP client and access the root directory of a website.

First, you’ll need to create a new text editor file. You can use Notepad, Bracket, Sublime Text, or any similar software to create one. In the file, ensure that you enter the following code:

<?PHP phpinfo(); ?>

Next, you’ll need to save the file and name it phpinfo.php. You can use any other name, but make sure that there is ‘.php’ at the end.

After that, you will need to use an FTP client to access the root directory of your website and upload the file. Simply drag the phpinfo.php file from the left panel and drop it into your site’s root directory.

Upload php info file

If you need help, then please see our guide on how to use FTP to upload files to WordPress.

Next, you will need to enter the following web address in your browser:

www.example.com/phpinfo.php

Just make sure that you replace the ‘example.com’ with your domain name.

From here, you’ll see details about PHP installation on your site and the path for locating the php.ini file.

View php installation details

To find the path of the file, you can look for the ‘Configuration File Path’ or ‘Loaded Configuration File’ fields.

You’ll see the path for the php.ini file in either one of the fields.

View path of php ini file

Once you know the path, you can access your site’s files using an FTP client.

From there, simply go to the path you just discovered and download the php.ini file.

Access path of php ini file and download it

Editing the php.ini File in WordPress

Now that you know the location of the php.ini file, the next step is to download and edit it.

Go ahead and open the file in Notepad or any other text editor.

Edit php ini file

Next, you can edit the file to improve your site’s performance. Here are a few common configurations you can make in the php.ini file:

  • max_execution_time – This is the time needed to run commands and execute scripts. You can increase the default time of 60 to a higher number if you’re uploading large files to the server.
  • memory_limit – It relates to the memory needed to upload files and execute commands. Editing the memory limit will help you accommodate long content and lots of images. By default, it is set to 256M, but you can increase the memory limit.
  • upload_max_filesize – Editing this option allows you to upload large media files and increase the limit.
  • post_max_size – If your blog posts contain a lot of images and videos, then the size of the post will increase. To avoid any errors, you can increase the post_max_size to accommodate more extensive articles.

Once you’ve made these changes to the php.ini file, you can simply upload it back to your server in the same location using the cPanel, an FTP client, or the file manager plugin.

We hope this article helped you learn where is php.ini in WordPress and how to edit it. You may also want to see our guide on the most common WordPress errors and the best WordPress plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Where Is php.ini in WordPress? (& How to Edit This File) first appeared on WPBeginner.

How to Disable WordPress Admin Email Verification Notice

Do you want to disable the admin email verification notice in WordPress?

By default, WordPress displays an admin email verification notice to the site administrators every few months to verify the email they use is still correct. It’s a pseudo-security measure that many site owners feel is unnecessary and annoying.

In this article, we will show you how to disable the admin email verification notice in WordPress.

How to Disable WordPress Admin Email Verification Notice

What is an Admin Email Verification Notice

The admin email verification notice feature was introduced in WordPress 5.3. The purpose of this feature is to show a screen to website administrators every few months that asks them to verify their site email address.

The admin email verification notice ensures that the email address provided by the administrator is accurate and still in use. Having a working email is important to site security and management.

Admin email verification notice

However, originally planned to appear every six months, sometimes the admin email verification notice can be displayed more frequently than necessary.

This can be annoying for users who’re just trying to log in to their WordPress website. Wouldn’t it be great if you could just turn off the admin email verification notice?

Let’s take a look at how to easily disable the admin email verification notice. You can click the links below to jump directly to the method you want to use.

You can easily disable the admin email verification notice by adding a code snippet to your WordPress files. If you haven’t done this before, then take a look at our beginner’s guide on pasting snippets from the web into WordPress.

Generally, you would need to manually add the code to your theme’s function.php file, but it can be a bit tricky since even a minor mistake can bring down your whole website.

This is why we recommend using a code snippet plugin like WPCode to add custom code in WordPress without having to edit your theme’s core files.

First, you need to install and activate the free WPCode plugin. For more instructions, please take a look at our guide on how to install a WordPress plugin.

Once the plugin is activated, go to Code Snippets » Add New from your WordPress admin dashboard.

Go to Code Snippets and click Add New

This will take you to the ‘Add Snippet’ page.

As we have to add custom code, simply click on the ‘Use Snippet’ button below the ‘Add  Your Custom Code (New Snippet)’ option.

Click Use Snippet button

This will take you to the ‘Create Custom Snippet’ page where you can start by entering a title for your code snippet. It can be anything that helps you identify the code.

Next, select the ‘PHP Snippet’ as the ‘Code Type’ from the drop-down menu on the right.

Choose PHP as a Code Type

After that, all you have to do is copy and paste the following PHP code snippet in the ‘Code Preview’.

// Disable WordPress Administration Email verification Screen 
add_filter( 'admin_email_check_interval', '__return_false' );
Disable sdmin email verification PHP snippet

After that, scroll down to the ‘Insertion’ section and select an insert method.

Now, simply choose the ‘Auto Insert’ option to automatically execute code on your site upon saving the snippet. Make sure to select the location “Admin Only”.

WPCode Insert Snippet for Admin Only

Now, go to the top of the page and toggle the switch from ‘Inactive’ to ‘Active’ in the top right corner and then click the ‘Save Snippet’ button.

Once, you have saved and activated the code snippet, it will be automatically executed on your site.

Click on Save Snippet button

Now you will no longer see the admin email verification notice.

Method 2. Disable Admin Email Verification Notice Using a Plugin

If you prefer not to add code to your WordPress site, you can always use a plugin.

For this tutorial, we will be using the Make Disable Admin Email Verification Prompt plugin.

The first thing you need to do is install and activate the Make Disable Admin Email Verification Prompt plugin. For more instructions, you can check out our guide on how to install a WordPress plugin.

Once the plugin is activated, simply go to Settings » General from your WordPress admin dashboard.

Go to Settings and then click on General

Now that you’re on the ‘General Settings’ page, scroll down to the bottom.

Here you will find the ‘Disable Admin Email Verification Prompt’ option. Now, simply make sure to check the box beside ‘Disable Admin Email Verification Screen.’

Check the disable admin email verification box

Don’t forget to click on the ‘Save Changes’ button to store your settings.

That’s it! You and your team should not see the admin email verification notice anymore.

We hope this article helped you learn how to disable the admin email verification notice in WordPress. You may also want to see our tutorial on how to disable automatic update email notifications in WordPress, and our comparison of the best email marketing services to grow your website traffic and sales.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Disable WordPress Admin Email Verification Notice first appeared on WPBeginner.

How to Easily Disable the Default WordPress Sitemap

Do you want to disable the default WordPress sitemap on your website?

The default sitemap feature was introduced in WordPress 5.5, and it enables WordPress to publish XML sitemaps for your website automatically. The challenge is that this feature is lacking advanced WordPress SEO features that you need to rank higher.

In this article, we will show you how to easily disable the WordPress sitemap and improve it with a more powerful solution.

How to Easily Disable the Default WordPress Sitemap

Why Should You Disable WordPress Sitemap

An XML sitemap is a file that lists all your website content in an XML format, which makes it easy for search engines to discover and index your content.

Sitemaps are very beneficial for your website as they bring more traffic and improve the SEO rankings of your site.

However, numerous WordPress SEO plugins like All in One SEO, Yoast SEO, and Google XML Sitemaps already implement sitemaps on your website, which results in WordPress pages having two sets of sitemaps.

Duplicate sitemaps for the same WordPress page can confuse search engines and can drop your SEO rankings.

If you’re not using a SEO plugin for your sitemap, then you’re missing out on advanced features. For example, many popular WordPress SEO plugins offer features like Video Sitemap, News Sitemap, RSS Sitemap, etc that you need to outrank your competitors in SEO.

With that being said, let’s see how you can easily disable the default WordPress sitemap.

Method 1. Disable WordPress Sitemap Using WordPress SEO Plugin

If you’re using any of the popular WordPress SEO plugins, then they will automatically disable the default WordPress sitemap feature and replace it with a more powerful solution.

For the sake of this tutorial, we will be demonstrating AIOSEO plugin because that’s the plugin we use on WPBeginner.

All in One SEO is the best WordPress SEO plugin that allows you to easily optimize your WordPress website for search engines and social media platforms. Over 3 million websites use AIOSEO including our own.

By default, All in One SEO will enable their Sitemap feature for you which automatically replaces the basic WordPress sitemaps upon activation.

The first thing you need to do is install and activate the AIOSEO plugin. For more details, please see our guide on how to install a WordPress plugin.

Once activated, you will need to configure the AIOSEO plugin. If you need help, then you can follow our step-by-step guide on how to set up All in One SEO in WordPress correctly.

After that, head over to the All in One SEO » Sitemaps page from the WordPress admin dashboard to review your sitemap settings.

Next, navigate to the ‘General Sitemap’ tab. Here, make sure that the ‘Enable Sitemap’ switch is set to ‘Active’. This will disable the default WordPress sitemap.

AIOSEO sitemap settings

Aside from the General Sitemap, we recommend that you enable the video sitemap, news sitemap, as well as the RSS sitemap on your site to maximize your SEO rankings.

Method 2. Disable WordPress Sitemap Using Code Snippet

You can also easily disable the default WordPress sitemap using code, too. You can add the code snippet in your theme’s functions.php file.

However, the biggest problem in adding code to your functions.php file is that even a tiny mistake can break your website.

That is why we recommend using WPCode to add custom code to WordPress. This free plugin makes it easy to add code snippets in WordPress without having to edit your theme’s functions.php file.

First, you need to install and activate the free WPCode plugin. For further instructions, check out our guide on how to install a WordPress plugin.

Next, go to the new Code Snippets entry in the left-hand menu of your WordPress dashboard. This will bring you to the ‘All Snippets’ page.

Next, just click on the ‘Add New’ button.

Go to Code Snippets and click on Add New

WPCode will then take you to the ‘Add Snippet’ page where you can choose to add your own custom code or search to find an existing snippet from the WPCode library.

As we have to add custom code, simply hover over ‘Add Your Custom Code (New Snippet)’ option and click ‘Use snippet.’

Click on the Use Snippet button

Now you will be directed to the ‘Create Custom Snippet’ page. You can start by typing a name for your code snippet. It can be anything you like.

Then, select a ‘Code Type’ from the dropdown menu to the right. As we will be using a PHP code, simply click on the ‘PHP Snippet’ option.

Type a name for your code snippet and choose PHP as code type

Next, simply copy and paste the following PHP code snippet in the ‘Code Preview’.

add_filter( 'wp_sitemaps_enabled', '__return_false' );

It will look like this when you’ve done so.

Paste your disable sitemap snippet

After pasting the code, scroll down to the ‘Insertion’ section where you will find two insert methods.

Simply choose the ‘Auto Insert’ option since you want it to run sitewide.

Choose an Insertion mode

Now, go to the top of the page, toggle the switch from ‘Inactive’ to ‘Active’ at the top right corner, and then click the ‘Save Snippet’ button.

Once, you have saved and activated the code snippet, it will be active and the default WordPress sitemap disabled.

Save your snippet

We hope this article helped you learn how to disable the default WordPress sitemap. You may also want to check out our ultimate WordPress SEO guide to improve your rankings, and see our comparison of the best managed WordPress hosting.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Easily Disable the Default WordPress Sitemap first appeared on WPBeginner.