Saturday, 6 April 2019

How to Increase Maximum File Upload Size in WordPress

Looking to increase your maximum file upload size in WordPress? Low file upload limits can cause a your file name exceeds the maximum upload size for this site error and stop you from uploading files in your media library or from installing large-sized plugins and themes.
Note: The first 3 methods are meant for quick fixing the issues caused by maximum file upload size limits. However, they may not work with some shared hosts.


The first way to increase the maximum file upload size limit is to edit your theme’s functions.php file.
To do that, you’ll need to go to Appearance » Editor from your dashboard. Then, go to the functions.phplink on the right-hand side’s panel and click it. As the file opens, scroll down to the bottom of the page and create a new line. Next, you’ll need to copy the code below and paste it there. After you do that, don’t forget to update the file.
1
2
3
@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '400' );

Once you do that, you can go ahead and check if it worked on your site. If it didn’t, you can try the other methods below.

2. Create or Edit an Existing PHP.INI File

For this method, you’ll need to access your WordPress site’s root folder by using an FTP or File Manager app in your hosting account’s cPanel dashboard.
Then, you’ll need to look for the php.ini file in your root folder. If you can’t find it, you’ll need to create a file called php.ini and upload it in the root folder. In most cases, if you’re on a shared host, you won’t see it.
Then, open the php.ini file and add the following code to it:
1
2
3
upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 400
The file size defined above in the example can be adjusted as per your needs.

3. Edit .htaccess file

To increase the maximum file upload size limit by this method, you’ll need to access the root folder of your site as in method 2.
Open your site’s root folder and find the .htaccess file in it. Then, open the file to edit it, and add the following code:
1
2
3
4
php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 400
php_value max_input_time 400
That’s it. You can go to media uploading option again and check if worked. If it didn’t work out, you’ll need to contact your hosting provider as suggested in the next method.

4. Ask Your Hosting Provider to Increase the Maximum File Upload Size

Saturday, 23 March 2019

Open new Window using under popup

<html><head><script>
var a=0;
function popup() {
if(a==0){
window.open ("https://sakhihosting.in","popup","menubar=1,resizable=1,width=450,height=550");
a++;
}
}
</script></head>
<body onclick="popup()">

Your main contents

</body></html>

Monday, 11 March 2019

HTML Share Buttons

First things first (although you may have thought it last), you need to style your buttons. Here is some pretty basic CSS code that will apply the default settings, best placed within your <head> tags (it’ll work just before the buttons though if you can only place it there). Obviously feel free to add to/amend any of this.
<style type="text/css">
#share-buttons img {
width: 35px;
padding: 5px;
border: 0;
box-shadow: 0;
display: inline;
}
</style>
view rawshare-buttons.css hosted with ❤ by GitHub
With your CSS in place, you then need to add the HTML script for the buttons…
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Buffer -->
<a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=https://simplesharebuttons.com" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/diggit.png" alt="Digg" />
</a>
<!-- Email -->
<a href="mailto:?Subject=Simple Share Buttons&amp;Body=I%20saw%20this%20and%20thought%20of%20you!%20 https://simplesharebuttons.com">
<img src="https://simplesharebuttons.com/images/somacro/email.png" alt="Email" />
</a>
<!-- Facebook -->
<a href="http://www.facebook.com/sharer.php?u=https://simplesharebuttons.com" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/facebook.png" alt="Facebook" />
</a>
<!-- Google+ -->
<a href="https://plus.google.com/share?url=https://simplesharebuttons.com" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/google.png" alt="Google" />
</a>
<!-- LinkedIn -->
<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=https://simplesharebuttons.com" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/linkedin.png" alt="LinkedIn" />
</a>
<!-- Pinterest -->
<a href="javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());">
<img src="https://simplesharebuttons.com/images/somacro/pinterest.png" alt="Pinterest" />
</a>
<!-- Print -->
<a href="javascript:;" onclick="window.print()">
<img src="https://simplesharebuttons.com/images/somacro/print.png" alt="Print" />
</a>
<!-- Reddit -->
<a href="http://reddit.com/submit?url=https://simplesharebuttons.com&amp;title=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/reddit.png" alt="Reddit" />
</a>
<!-- StumbleUpon-->
<a href="http://www.stumbleupon.com/submit?url=https://simplesharebuttons.com&amp;title=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/stumbleupon.png" alt="StumbleUpon" />
</a>
<!-- Tumblr-->
<a href="http://www.tumblr.com/share/link?url=https://simplesharebuttons.com&amp;title=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/tumblr.png" alt="Tumblr" />
</a>
<!-- Twitter -->
<a href="https://twitter.com/share?url=https://simplesharebuttons.com&amp;text=Simple%20Share%20Buttons&amp;hashtags=simplesharebuttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/twitter.png" alt="Twitter" />
</a>
<!-- VK -->
<a href="http://vkontakte.ru/share.php?url=https://simplesharebuttons.com" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/vk.png" alt="VK" />
</a>
<!-- Yummly -->
<a href="http://www.yummly.com/urb/verify?url=https://simplesharebuttons.com&amp;title=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/yummly.png" alt="Yummly" />
</a>
</div>
That will get your share buttons up and running! You’ll be sharing this website though, so there’s still more to be done…
Start by changing all instances of ‘https://simplesharebuttons.com’ with the URL of the site/page you wish the buttons to act for.
Note that you will need to include the http:// or https:// for the links to be shared correctly. All share buttons, bar Pinterest, will need this changing.
Next, change the four instances of ‘Simple Share Buttons’ to the title of the page or website that the buttons will be displayed. These are present for the following share buttons:
  • Twitter
  • Reddit
  • StumbleUpon
  • Email
There are further customisable options available for some of these share buttons, but let’s keep things simple for now.
Last, but by no means least, the images. The HTML code above will use buttons located on this website, which you are more than welcome to use. The buttons will load more quickly however if you upload them and change the image sources accordingly.
You can download a zipped folder of the ones in this example here.

coding souce https://simplesharebuttons.com/html-share-buttons/