WordPress – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Fri, 04 Nov 2022 06:14:13 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 10 Simple Ways to Speed Up Your WordPress Website https://tecadmin.net/ways-to-speed-up-your-wordpress-website/ https://tecadmin.net/ways-to-speed-up-your-wordpress-website/#comments Thu, 03 Nov 2022 09:37:43 +0000 https://tecadmin.net/?p=11533 Did you know that the average user will abandon your website if it takes longer than 5 seconds to load? That’s right, if your website loads too slowly, users will get frustrated and leave. In fact, Statistica reports that 47% of online shoppers will abandon a website if it takes more than 3 seconds to [...]

The post 10 Simple Ways to Speed Up Your WordPress Website appeared first on TecAdmin.

]]>
Did you know that the average user will abandon your website if it takes longer than 5 seconds to load? That’s right, if your website loads too slowly, users will get frustrated and leave. In fact, Statistica reports that 47% of online shoppers will abandon a website if it takes more than 3 seconds to load. If you’ve ever spent time browsing the Internet, you’ll know how crucial speed is to keep users engaged. It doesn’t matter how great your content is or how good your site looks – if it doesn’t load fast enough, people won’t stick around long enough to find out. Luckily, there are lots of ways you can optimize your website so that it loads faster than ever before.

Your website is the first impression your potential customers will have of your business. Whether it’s a personal blog or an eCommerce store, you want your site to look great and load quickly. If you find yourself often frustrated by slow page loads and lagging performance, it’s time to consider speeding up your WordPress site. A fast website not only makes users happy but also helps search engines index your pages faster. With that in mind, let’s take a look at some easy ways to make your site faster than ever before.

In this blog post, we will discuss a few ways to speed up your WordPress website.

1. Select Correct Hosting Provider

Web hosting is essential to get space for your WordPress website over the web. There are many companies involved in web hosting services that can help you in this regard. One can find different types of web hosting plans that vary in terms of their time duration and charges. However, the website owner has a choice to opt the desired web hosting plan for the site for a specific time duration and pay accordingly.

Simple Ways to Speed Up Your WordPress Website

2. Install a WordPress Performance Plugin

A WordPress performance plugin is a simple software solution that can help you optimize your website for speed. These plugins can improve the way your website loads by caching content, compressing images, managing asset delivery, and more. You can find lots of WordPress performance plugins on the internet. We recommend WPRocket, which is trusted by over 1 million WordPress users.

WPRocket is easy to install and fully customizable. Once you install it, you can go into your website’s settings and choose how you want to optimize your site for speed. WPRocket also comes with a Site Audit tool that analyzes your site and tells you where you’re experiencing issues and how you can improve your website’s speed.

WP-Rocket: Speed Up Your WordPress Website
WP-Rocket: Speed Up Your WordPress Website

3. Select the Right Theme or Framework

Your website’s theme is one of the biggest factors that affect how fast it loads. If your theme is too heavy, it will slow down your site. If your theme is lightweight, however, it won’t cause as much of a delay. Unfortunately, many people don’t realize this and end up choosing a theme that is too heavy. If you want to speed up your website, you should choose a lightweight theme. To find a lightweight theme, check out this list of the top 20 fastest WordPress themes. You should also make sure that you’re not using too many plugins – each one can slow down your site.

Boost Your WordPress 1

4. Optimize Your Images

Images can make your website more attractive and engaging, but if they’re too large, they’ll slow down your site. If you want to speed up your website and keep your users happy, you need to optimize your images. This means you’ll need to find an image editing software that can help you change their size without compromising their quality.

You can use an image editing tool to reduce the size of your images without losing any quality by: When you optimize your images, you’ll make your website faster. This means that users will be less likely to get frustrated and leave – and they’ll be more likely to click through to the next page.

5. Define a Content Strategy

Ever noticed how some websites seem to constantly update their content, while others don’t update as often? The difference is likely in the content strategy. A content strategy is a blueprint you follow to create content on your website. With a content strategy, you can create a schedule and streamline your publishing process, which reduces the time it takes to create new content. This means you can create and publish new content more quickly, which speeds up your website.

A content strategy can also help you to focus on quality content rather than quantity. This means that you’ll create fewer posts but you’ll publish posts that contain more information. When you publish fewer posts but focus on quality, you can help your visitors. This means that your content will be more beneficial and your readers will benefit from it.

6. Combine Static and Dynamic Content

Static and dynamic content are two different types of content that websites often use. Static content is unchanging, while dynamic content is content that changes regularly. You might notice that some websites use more static content while others use more dynamic content. This difference can affect how quickly the site loads. When you combine static and dynamic content, you can help your website load faster. This is because some of your content will remain unchanged, while other content will change regularly.

Instead of creating one big post that changes everything on your website regularly, create a post that is static and another post that changes regularly. When you combine static and dynamic content, you can help your website load faster. This is because some of your content will remain unchanged, while other content will change regularly.

7. Content Deliver Network (CDN)

The Internet is constantly growing, and having a website that loads quickly is essential. A CDN is a network of servers across the world that can help speed up your WordPress website. This can be especially important if you have a large number of visitors. There are several types of CDN, but they all serve the same purpose: to cache pages and make them load more quickly. You should use a CDN if you’re worried about slow performance or high traffic.

There are several advantages to using a CDN. First, it can improve the overall speed of your WordPress site by reducing latency. Second, it can help reduce server strain because it reduces the number of requests on a given server. Third, it can also help with SEO because it adds a layer of content to your site.

8. Enable Gzip Compression

Gzip compression is a feature that some hosting providers include as part of their service. If you’re using shared hosting, you may already have to gzip compression. If you don’t, you can enable it in your website’s settings. Gzip is a type of compression that can help to reduce the size of your website’s assets. This means that your website will load faster. Gzip compression can help to speed up your website, especially if you’re using WordPress. If you enable gzip compression, it will reduce the size of your WordPress site and help to speed it up.

Boost Your WordPress 3

9. Keep the Database Optimized

The proper optimization of your website’s database may help you boost site’s speed. It can be done by using the plugin that optimizes the database of the site correctly. For instance, WP-Sweep is a significant database optimizer plugin that includes valuable functions which enable one to manage the database of the site easily. This may result in increasing the site’s online performance and speed too.

Boost Your WordPress 4

10. Resolve 404 Errors

Many times, you have encountered with 404 errors or not found an error while searching any web page online. If your WordPress site starts showing a 404 error, then it’s important to remove it immediately. This error shows disconnection of it from the server and can also lower the speed of the website. By resolving this issue, you can easily improve the speed of the site.

How to Redirect 404 Error Pages to Home Page in WordPress

Boost Your WordPress 2

Conclusion

If you want to speed up your WordPress website, you need to look at your site’s design, images, and content. You can also install a website performance plugin to help you optimize your site for speed. If your website takes too long to load, users will get frustrated and leave. Make sure that your website loads quickly by optimizing your images, using lightweight themes, and combining static and dynamic content. You can also enable gzip compression to help reduce the size of your site. If you follow these tips, you can speed up your WordPress website and keep your users happy.

The post 10 Simple Ways to Speed Up Your WordPress Website appeared first on TecAdmin.

]]>
https://tecadmin.net/ways-to-speed-up-your-wordpress-website/feed/ 8
Update WordPress Ping List to Quick Index of Posts https://tecadmin.net/update-wordpress-ping-list/ https://tecadmin.net/update-wordpress-ping-list/#respond Tue, 16 Jan 2018 19:57:35 +0000 https://tecadmin.net/?p=14814 Every blogger and author wants their posts to get indexed as quickly as possible. So their new content will be visible on search engines. Generally, search engines crawlers come to website and index the new content found. But this process takes times. Using the ping services you can inform the search engines that your website [...]

The post Update WordPress Ping List to Quick Index of Posts appeared first on TecAdmin.

]]>
Every blogger and author wants their posts to get indexed as quickly as possible. So their new content will be visible on search engines. Generally, search engines crawlers come to website and index the new content found. But this process takes times. Using the ping services you can inform the search engines that your website have new content, so they can visit your site quickly.

For static sites, you can use services like Ping-o-Matic to ping the search engines. But this is a manual process. WordPress users can use this service automatically even WordPress does this. You can configure your WordPress with more ping lists to update more quickly to among search engines.

WordPress Ping List URLs

Below is the list of ping URLs can be used with your WordPress blog. Copy the below lists in system clipboard.

http://1470.net/api/ping
http://api.feedster.com/ping
http://api.moreover.com/ping
http://api.moreover.com/RPC2
http://api.my.yahoo.com/RPC2
http://api.my.yahoo.com/rss/ping
http://bblog.com/ping.php
http://bitacoras.net/ping
http://blo.gs/ping.php
http://blog.goo.ne.jp/XMLRPC
http://blogdb.jp/xmlrpc
http://blogmatcher.com/u.php
http://blogs.yandex.ru/
http://bulkfeeds.net/rpc
http://coreblog.org/ping/
http://geourl.org/ping
http://ipings.com
http://mod-pubsub.org/kn_apps/blogchatt
http://ping.amagle.com/
http://ping.bitacoras.com
http://ping.blo.gs/
http://ping.bloggers.jp/rpc/
http://ping.blogmura.jp/rpc/
http://ping.blogs.yandex.ru/RPC2
http://ping.cocolog-nifty.com/xmlrpc
http://ping.exblog.jp/xmlrpc
http://ping.fc2.com/
http://ping.feedburner.com
http://ping.myblog.jp
http://ping.rootblog.com/rpc.php
http://ping.rss.drecom.jp/
http://ping.syndic8.com/xmlrpc.php
http://ping.weblogalot.com/rpc.php
http://ping.weblogs.se/
http://pingoat.com/goat/RPC2
http://rcs.datashed.net/RPC2/
http://rpc.blogbuzzmachine.com/RPC2
http://rpc.bloggerei.de/
http://rpc.bloggerei.de/ping/
http://rpc.blogrolling.com/pinger/
http://rpc.copygator.com/ping/
http://rpc.icerocket.com:10080/
http://rpc.newsgator.com/
http://rpc.odiogo.com/ping/
http://rpc.weblogs.com/RPC2
http://rpc.pingomatic.com
http://rpc.technorati.com/rpc/ping
http://rpc.twingly.com
http://topicexchange.com/RPC2
http://trackback.bakeinu.jp/bakeping.php
http://www.a2b.cc/setloc/bp.a2b
http://www.bitacoles.net/ping.php
http://www.blogdigger.com/RPC2
http://www.blogoole.com/ping/
http://www.blogoon.net/ping/
http://www.blogpeople.net/servlet/weblogUpdates
http://www.blogroots.com/tb_populi.blog?id=1
http://www.blogshares.com/rpc.php
http://www.blogsnow.com/ping
http://www.blogstreet.com/xrbin/xmlrpc.cgi
http://www.feedsubmitter.com
http://www.lasermemory.com/lsrpc/
http://www.mod-pubsub.org/kn_apps/blogchatter/ping.php
http://www.newsisfree.com/RPCCloud
http://www.newsisfree.com/xmlrpctest.php
http://www.pingerati.net
http://www.pingmyblog.com
http://www.popdex.com/addsite.php
http://www.snipsnap.org/RPC2
http://www.weblogalot.com/ping
http://www.weblogues.com/RPC/
http://xmlrpc.blogg.de
http://xping.pubsub.com/ping

Updating WordPress Ping List

Login to your WordPress admin dashboard and navigate to Settings >> Writing.

Pase all the ping lists copied above to the Update Services input box and save this.

All done. Now WordPress automatically ping to all URLs configured above whenever you created a new post for updated existing post.

The post Update WordPress Ping List to Quick Index of Posts appeared first on TecAdmin.

]]>
https://tecadmin.net/update-wordpress-ping-list/feed/ 0
Reset WordPress Admin Password via SQL or phpMyAdmin https://tecadmin.net/reset-wordpress-admin-password/ https://tecadmin.net/reset-wordpress-admin-password/#respond Sun, 05 Nov 2017 09:36:43 +0000 https://tecadmin.net/?p=14080 Question – How to reset WordPress admin password via SQL query? How to reset WordPress admin password using phpMyAdmin? How to Reset WordPress forgotten password with SQL query? How to find WordPress default admin password? If you have forgotten your SugarCRM admin password or due to any reason, you are not able to login to [...]

The post Reset WordPress Admin Password via SQL or phpMyAdmin appeared first on TecAdmin.

]]>
Question – How to reset WordPress admin password via SQL query? How to reset WordPress admin password using phpMyAdmin? How to Reset WordPress forgotten password with SQL query? How to find WordPress default admin password?

If you have forgotten your SugarCRM admin password or due to any reason, you are not able to login to SugarCRM with admin user. You can simply check the active admin user using SQL query and reset the password with simple SQL query.

Reset WordPress Admin Password via SQL

The first query will fetch show the details of the administrator account based on username.

SELECT * FROM wp_users WHERE user_login = 'admin';

If you only have the email address of admin user. Search user details using the command.

SELECT * FROM wp_users WHERE user_email = 'admin@example.com';

WordPress uses md5 encrypted passwords. The query will change the password for the specified username. You must change new_password with your password and ID with the got ID from above queries.

UPDATE wp_users SET user_pass = md5('new_password') WHERE ID = 1;

Reset WordPress Admin Password via phpMyAdmin

You can also connect WordPress database with phpMyAdmin and reset the admin password. Open table wp_users and edit the record of the admin user. Now under the user_pass column, select the MD5 in functions and put plain text password in value section and save it.

Reset WordPress Admin Password

The post Reset WordPress Admin Password via SQL or phpMyAdmin appeared first on TecAdmin.

]]>
https://tecadmin.net/reset-wordpress-admin-password/feed/ 0
Top 5 WordPress Security Plugins To Keep Your Website Safe https://tecadmin.net/top-wordpress-security-plugins/ https://tecadmin.net/top-wordpress-security-plugins/#comments Tue, 28 Mar 2017 15:07:53 +0000 https://tecadmin.net/?p=12152 Due to WordPress immense popularity, it is no wonder that it draws the interest of hackers. WordPress comes with its own security measures that are constantly being updated via its auto-update feature. But is this enough? If you truly want to make sure that your WordPress website is safe, you should look into the wide [...]

The post Top 5 WordPress Security Plugins To Keep Your Website Safe appeared first on TecAdmin.

]]>
Due to WordPress immense popularity, it is no wonder that it draws the interest of hackers. WordPress comes with its own security measures that are constantly being updated via its auto-update feature. But is this enough?

If you truly want to make sure that your WordPress website is safe, you should look into the wide variety of security plugins that the WordPress community has to offer. These plugins supply you with additional functionalities, making sure that your website is safe from known threats. These are the top WordPress security plugins that can help you keep your website safe.

#1. BulletProof Security

BulletProof Security is a popular plugin that takes care of multiple things. It has its own firewall and offers database and login security, and more. It has a four-click setup interface, which makes it easy for you to install it and not worry about your website’s security.

What it does is that it puts a limit on failed login attempts, and blocks fake traffic, and code and security scanners. It also incorporates IP blocking. By periodically checking the code of WP’s core files, plugins, and themes, it searches for known threats and notifies the admin if it finds any. The threats include XSS, CRLF, Base64, RFI, CSRF, Code, SQL injection and various others.

Furthermore, it implements caching so that you can improve your website performance. There is also a file manager for htaccess. Finally, it has an auto-update feature, in order to make sure that your website is always safe.

#2. WordFence

WordFence is probably the most popular WP security plugin. It continually checks your website for malware infections, by scanning all your WordPress core files, themes and plugins. It is made to block brute-force attacks and enables you to add two-factor authentication via SMS. It also makes it possible to block traffic from a particular country. Its own firewall blocks fake traffic, scanners and malicious bots. Furthermore, it scans your host for known backdoor threats such as R57 and C99. Next, to that, it checks your comments and posts for malicious code.

Next, to security options, it uses the Falcom caching engine to improve your website’s performance. The developers claim that it can make your WordPress website 50 times faster and more secure. If you want additional functionalities, you can go premium.

#3. Sucuri Security

Coming from the renowned web security and auditing company Sucuri, Sucuri Security is a plugin that offers features like file integrity monitoring, malware scan, security activity auditing, blacklist monitoring, and its own firewall. It brings together multiple blacklist engines such as Sucuri labs, Norton, McAfee Site Advisor, and Google Safe Browsing to check your site for any threats, and notifies you if it finds any.

It makes sure that your website is secure from brute force attacks, DOS attacks, Zero Day Disclosure Patches, and other threats. It also keeps a log of all these activities and uploads them to the Sucuri cloud. So, even if an attacker gets through your security controls, your logs will be safe. If you want to get full support and additional functionalities, you can go premium.

#4. Shield Security

One of the main reasons why people make an aversion towards security plugins is the inequality of protection it gives to its free users when compared to their premium counterparts. This is just one of the things that make Shield Security different. Seeing that it offers no premium version, they offer full support to every single one of their users which makes it a viable choice in any situation.

Apart from this, it has a fairly easy to use IP white listing protocol, which on its own has a fairly impressive range. Additionally, the developers themselves are actively encouraging users to get engaged in the development process. This also means that if while using it, you feel like there is a feature missing, all you need to do is go to the support forum and suggest it.

#5. All in One WP Security & Firewall

Finally, All In One WP Security & Firewall may be just the thing you need in order to take a holistic approach to your website’s security. First, it goes on to scan your current security system in order to see how well you are faring at the moment. Then, it uses various security points to give you an insightful analysis on points that should get a bit of an upgrade. Eventually, it presents you with three sets of security rules categorized as ‘basic’, ‘intermediate’ and ‘advanced’. This way, you don’t have to introduce some of the more radical changes at once.

One of its strongest traits is its security scanner, which immediately alerts you in the case of any unauthorized change in your WordPress system. Sure, sometimes the change will be completely legitimate, but this will also give you a chance to react in a situation where the bad code gets injected. Apart from this, it also comes along with an amazing comment spam security, front-end text copy protection as well as a reliable brute force login attack prevention.

In summation

Next to installing some of these top WordPress security plugins, you should also practice some of the basic security measures. Your WordPress installation needs to always be up to date, and the same goes for your plugins and themes. When it comes to the latter, you should always download them from trusted websites. Finally, be smart with your usernames and passwords.

The post Top 5 WordPress Security Plugins To Keep Your Website Safe appeared first on TecAdmin.

]]>
https://tecadmin.net/top-wordpress-security-plugins/feed/ 3
Everything You Need to Know About Migrating a WordPress Website to HTTPS https://tecadmin.net/migrating-a-wordpress-website-to-https/ https://tecadmin.net/migrating-a-wordpress-website-to-https/#respond Fri, 10 Mar 2017 17:20:27 +0000 https://tecadmin.net/?p=11685 Google has been pretty adamant in its efforts to make the web more secure. First, by proposing that web browsers should start flagging all HTTP pages as insecure, then by boosting search engine rankings for websites which use HTTPS. Additionally, Google has decided to place a red X in the address bar, striking through websites [...]

The post Everything You Need to Know About Migrating a WordPress Website to HTTPS appeared first on TecAdmin.

]]>

Google has been pretty adamant in its efforts to make the web more secure. First, by proposing that web browsers should start flagging all HTTP pages as insecure, then by boosting search engine rankings for websites which use HTTPS. Additionally, Google has decided to place a red X in the address bar, striking through websites which don’t use a secure, or HTTPS connection and plans on marking all non-secure pages, including HTTP with the same indicator used to indicate a broken HTTPS links. But are these reasons enough to migrate your WordPress from HTTP to HTTPS?

What is HTTPS?

HTTPS or HyperText Transfer Protocol Secure is a protocol used to allow secure communication between your browser and the web server. Unlike HTTPS, which is a secure connection, HTTP is insecure and it’s possible for any unauthorized parties to intercept and listen to the communication between you and the website. This communication is typically pretty ordinary unless you’re entering any sensitive information including a password, credit card info or a social security number. HTTPS adds a layer of security over the communication using SSL/TSL or Secure Sockets Layer and Transport Layer Security protocol by encrypting the data and protecting its integrity during transfer.

Why should you move to HTTPS?

There are several reasons why you should move your WordPress website to HTTPS. The first and most obvious one is security. With HTTPS, all the information, which would normally be sent as plain text, is completely encrypted. This is particularly useful for e-commerce websites, which handle customer information on a daily basis. Secondly, it has added SEO benefits due to HTTPS being a ranking signal. Finally, green address bar helps build what is called SSL trust. This means that the customers are more relaxed when they know that their data is secure.

Transferring to HTTPS


The basic requirement for transferring your WordPress website from HTTP to HTTPS is an SSL certificate. You can either buy one using a certified vendor or by asking your provider to get one for you. A single domain certificate costs around $9 per year. Once you have the certificate, it’s time to install it on your website. First, you need to generate a CRS code and an RSA key and take them and the certificate and give them to your WordPress host.

Redirecting HTTP to HTTPS

Now that you have installed the SSL certificate, it’s time to redirect all HTTP traffic to HTTPS. Fortunately, there’s a WordPress plugin just for that called Really Simple SSL. It detects the existing settings and configures your website to run over HTTPS. If you’re using an Apache server, you can redirect the traffic using the following line of code which you add to the .htaccess file:

RewriteEngine on
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.yourwebsite.com/$1 [R=301,L]

Updating links to HTTPS

This is a pretty straight-forward job. You can do it by hand, by that would take a lot of time. Instead, you can use a free WordPress plugin called Better Search Replace, which does this job automatically. Once you install it, navigate to the Tools section of the WordPress dashboard and select the Better Search Replace plugin. Click on Search/Replace and under Search for enter the old WordPress domain address and under Replace with the HTTPS address. Once you’ve selected the necessary tables, simply click Run Search/Replace.

Transferring CDN to HTTPS

As you migrate your WordPress website to HTTPS, you should to the same with any CDNs you might be using. If you don’t, you risk getting a mixed-content warning on your website. There are numerous tutorials available on the internet on how to accomplish this, so feel free to check them out. Once you’ve updated the CDN, it’s time to update that info in the WordPress plugin used for integration. You can use CDN enabler to switch the URL from HTTP to HTTPS and enable the CDN HTTPS option.

Check for Mixed Content Warnings

When you move to HTTPS, the biggest challenge you’ll experience is preparing your content for secure connections. When a page is loaded via HTTPS, all the elements such as images or JavaScript files need to be loaded via HTTPS as well. If you don’t, you’ll end up getting a lot of mixed content warnings. The easiest way to check your WordPress website is to use the SSL Check tool, which crawls your website a looks for insecure elements such as images and JavaScript. Once found, you should replace them with HTTPS equivalents.

Updating the Google Search Console Profile

Now that your website is running on HTTPS, the next step is to create a new HTTPS version of the Google Search Console profile. When you’ve finished creating the new profile, it’s time to re-submit the sitemap files. Those who have a disavow file need to update it as well. Simply go to the Google’s Disavow Tool, select your old HTTP profile and download the file. Open the tool again, only this time you’ll have to submit the HTTPS version of the disavow file.

Updating Google Analytics

Finally, you need to update your Google analytics. This does not affect the analytics data, but it does, however, help when you have to link your WordPress website to the Google Search Console. All you have to do is to click on the domain property settings and change the default URL to HTTPS version. Do the same for the view settings and remember to re-link the newly created Search Console Profile with the Analytics account.

At this moment, HTTPS is the leading standard when it comes to website security. Although migrating your WordPress website from HTTP to HTTPS requires a little more work, it does come with a number of added benefits. Not to mention that if you follow the guidelines closely, the work itself is fairly easy. Just make sure to update the SSL certificate once a year. This may sound like a hassle, but it’s a small task to ensure the privacy and security of your data, and the data of your users.

The post Everything You Need to Know About Migrating a WordPress Website to HTTPS appeared first on TecAdmin.

]]>
https://tecadmin.net/migrating-a-wordpress-website-to-https/feed/ 0
WordPress Redirecting 404 Error to Home Page https://tecadmin.net/redirect-404-error-pages-home-wordpress/ https://tecadmin.net/redirect-404-error-pages-home-wordpress/#comments Sun, 05 Mar 2017 15:23:44 +0000 https://tecadmin.net/?p=11559 The 404 error means the requested page doesn’t exist on the server. If you are getting multiple 404 errors on your WordPress site and you don’t have any specific page for 404. In this case, you can simply make 301 redirect all 404 requests to your website home page. To do this you don’t need [...]

The post WordPress Redirecting 404 Error to Home Page appeared first on TecAdmin.

]]>
The 404 error means the requested page doesn’t exist on the server. If you are getting multiple 404 errors on your WordPress site and you don’t have any specific page for 404. In this case, you can simply make 301 redirect all 404 requests to your website home page. To do this you don’t need to install the extra plugin on your site, A small PHP code will do this for you.

Redirect 404 Error Pages to Home

Got to your WordPress theme directory and edit 404.php file in your WordPress. Let’s add following small PHP script at top of the file. The first line in the script will make the redirection as 301 permanently.

<?php
  header("HTTP/1.1 301 Moved Permanently");
  header("Location: ".get_bloginfo('url'));
  exit();
?>

Also you can replace .get_bloginfo(‘url’) with your website domain name to avoid extra request to WordPress to get domain name and make redirection more faster like below.

<?php
  header("HTTP/1.1 301 Moved Permanently");
  header("Location: http://www.example.com");
  exit();
?>

Finally, test the redirection in your browser window.

The post WordPress Redirecting 404 Error to Home Page appeared first on TecAdmin.

]]>
https://tecadmin.net/redirect-404-error-pages-home-wordpress/feed/ 8
WordPress – Error establishing a database connection (Fixed) https://tecadmin.net/wordpress-error-establishing-a-database-connection-fixed/ https://tecadmin.net/wordpress-error-establishing-a-database-connection-fixed/#respond Thu, 02 Mar 2017 14:05:22 +0000 https://tecadmin.net/?p=11473 Sometimes you may face issue with your WordPress blog with error message “Error establishing a database connection”. This will make your site unavailable for you and users. You can’t access your WordPress admin dashboard. This can be the frustrating time to you. This tutorial will guide you step by step to find out the cause [...]

The post WordPress – Error establishing a database connection (Fixed) appeared first on TecAdmin.

]]>
Sometimes you may face issue with your WordPress blog with error message “Error establishing a database connection”. This will make your site unavailable for you and users. You can’t access your WordPress admin dashboard. This can be the frustrating time to you. This tutorial will guide you step by step to find out the cause and fix it.

1. Check MySQL Server

First, check if MySQL server is up and running. You can use below command to connect your MySQL server. This will insure that your database server is running properly.

$ mysql -u <username> -p 

If you don’t have command access, connect database with phpMyAdmin or Adminer.

2. Check WordPress Config File

The next step is to verify connection settings in the wp-config.php configuration file. Edit file and check following settings.

 define('DB_NAME', 'wordpress');
 define('DB_USER', 'wpuser');
 define('DB_PASSWORD', 'wppassword');
 define('DB_HOST', 'localhost');

Make sure all above entries are configured correctly. You can simply verify these settings by connecting MySQL server using above details either from command line or phpMyAdmin.

$ mysql -h localhost -u wpuser -p'wppassword' wordpress

The above command should be connected to MySQL server properly. You can also verify all tables by running show tables commands from MySQL shell.

3. Check Database Connection

At the end, You can verify all settings by create a small php script. create a new file dbconn.php and add following content.

<?php
$DB_HOST = "localhost";
$DB_USER = "wpuser";
$DB_PASSWORD = "wppassword";

$conn = new mysqli($DB_HOST, $DB_USER, $DB_PASSWORD);

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>

Upload dbconn.php to the server under WordPress document root and access it through web browser. If there is any issue with the connection to MySQL using PHP with configured settings, You will see the error message on the web page.

The post WordPress – Error establishing a database connection (Fixed) appeared first on TecAdmin.

]]>
https://tecadmin.net/wordpress-error-establishing-a-database-connection-fixed/feed/ 0
How to Disable Comments on Attachments in WordPress https://tecadmin.net/disable-comments-on-attachments-wordpress/ https://tecadmin.net/disable-comments-on-attachments-wordpress/#comments Tue, 17 Jan 2017 05:37:48 +0000 https://tecadmin.net/?p=11459 Many of spammers target to media attachments on your WordPress website for comments. You can disable comments on your media attachments by using WordPress plugin or adding custom PHP code in your theme file. Below is the two methods described to disable comments on media attachments. Read: How to Disable Pingbacks and Trackbacks in WordPress [...]

The post How to Disable Comments on Attachments in WordPress appeared first on TecAdmin.

]]>
Many of spammers target to media attachments on your WordPress website for comments. You can disable comments on your media attachments by using WordPress plugin or adding custom PHP code in your theme file. Below is the two methods described to disable comments on media attachments.

Method 1 – Using Plugin

Disable Comments WordPress plugin provides and option to disable comments globally on your WordPress website. This plugin allows you to disable all type of comments like post comments, pages comments, and media comments.

Disable Comments on Attachments

Method 2 – Using PHP Code

If you don’t want to use any plugin, You can disable media comments by adding custom code in your WordPress theme. Edit functions.php in your WordPress theme file and append following code. This will disable comments on your media posts.

function add_filter_media_comment ( $open, $post_id ) {
	$post = get_post( $post_id );
	if( $post->post_type == 'attachment' ) {
		return false;
	}
	return $open;
}
add_filter( 'comments_open', 'add_filter_media_comment', 10 , 2 );

The post How to Disable Comments on Attachments in WordPress appeared first on TecAdmin.

]]>
https://tecadmin.net/disable-comments-on-attachments-wordpress/feed/ 1
How to Disable Pingbacks and Trackbacks in WordPress https://tecadmin.net/disable-pingbacks-trackbacks-wordpress/ https://tecadmin.net/disable-pingbacks-trackbacks-wordpress/#comments Tue, 17 Jan 2017 04:16:02 +0000 https://tecadmin.net/?p=11442 Many spammers used Pingbacks and Trackbacks to create spam content on your WordPress site. This tutorial will help you to disable pingbacks and trackbacks in WordPress. Also, remove old pingbacks and trackbacks from the database. Read: How to Disable Comments on Attachments in WordPress Disable Pingbacks and Trackbacks Use this option to disable pingbacks and [...]

The post How to Disable Pingbacks and Trackbacks in WordPress appeared first on TecAdmin.

]]>
Many spammers used Pingbacks and Trackbacks to create spam content on your WordPress site. This tutorial will help you to disable pingbacks and trackbacks in WordPress. Also, remove old pingbacks and trackbacks from the database.

Disable Pingbacks and Trackbacks

Use this option to disable pingbacks and trackbacks from new articles. Go to WordPress admin panel and then go Settings >> Discussion option. Now uncheck the box showing in below screenshot under Default article settings section.

Disable Pingbacks and Trackbacks

Disable for Existing Articles

The above option will disable the pingbacks and trackbacks for new articles, but you still needs to disable it for existing articles. You can do this by directly querying the database. Change table name wp_posts with your table name if you are using a different prefix.

mysql> UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post';
mysql> UPDATE wp_posts SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'page';

Remove Pingbacks and Trackbacks

Finally, you need to remote Pingbacks and Trackbacks from existing articles. Use below query to remote it. You may need to change table name wp_comments if using different table prefix.

mysql> DELETE FROM  wp_comments WHERE  comment_type = 'trackback';

The post How to Disable Pingbacks and Trackbacks in WordPress appeared first on TecAdmin.

]]>
https://tecadmin.net/disable-pingbacks-trackbacks-wordpress/feed/ 2
How to Password Protect WordPress Admin (wp-admin) URL https://tecadmin.net/password-protect-wordpress-admin-url/ https://tecadmin.net/password-protect-wordpress-admin-url/#comments Sun, 01 Jan 2017 03:29:46 +0000 https://tecadmin.net/?p=10968 WordPress is the most popular content management system used world-wide. This tutorial will help you to set up password-protected WordPress admin wp-admin directory and make it secure from public use. So that Step 1 – Generate .htpasswd File If you have shell access, you can generate a .htpasswd file using the command line. First, create [...]

The post How to Password Protect WordPress Admin (wp-admin) URL appeared first on TecAdmin.

]]>
WordPress is the most popular content management system used world-wide. This tutorial will help you to set up password-protected WordPress admin wp-admin directory and make it secure from public use. So that

Step 1 – Generate .htpasswd File

If you have shell access, you can generate a .htpasswd file using the command line. First, create the directory structure where you want to place this file. It will good to put this file outside of document root.

touch /etc/apache2/.htpasswds/.htpasswd

Now use the following command to create the first user in .htpasswd. cPanel users can use their dashboard to generate this file. If you don’t have shell access, you can use online htpasswd generator it and put on your server.

htpasswd -m /etc/apache2/.htpasswds/.htpasswd user1

Step 2 – Configure .htaccess

Now create a .htaccess under wp-admin directory on server and put following content. Update the location of AuthUserFile properly as per location of .htpasswd on your server.

# Password Protected wp-admin directory
AuthType basic 
AuthName "Only Admin Allowed"
AuthUserFile /etc/apache2/.htpasswds/.htpasswd 
AuthGroupFile /dev/null
require valid-user

<Files admin-ajax.php>
    Order allow,deny
    Allow from all
    Satisfy any
</Files>

Step 3 – Access Your Website

Now visit your WordPress website home page, It will not prompt for any password. But when you navigate to wp-admin directory, It will prompt for authentication.

The post How to Password Protect WordPress Admin (wp-admin) URL appeared first on TecAdmin.

]]>
https://tecadmin.net/password-protect-wordpress-admin-url/feed/ 5