Categories
WordPress How To

How to replace a string in all posts in WordPress database?

We had some anomalies in our WordPress sites that some of them old posts have the wrong interpretation of single quotes and double quotes so we had to manually replace all the wrong strings to the correct quotes.

In cpanel, you can open up phpmyadmin to run the following MySQL queries, but first, you need to back up the database.

update wp_posts set post_content =
replace(post_content, '’', "'"), post_title =
replace(post_title, '’', "'");

update wp_posts set post_content =
replace(post_content, '“', '"'), post_title =
replace(post_title, '“', '"');

update wp_posts set post_content =
replace(post_content, '”', '"'), post_title =
replace(post_title, '”', '"');

update wp_posts set post_content =
replace(post_content, '‘', "'"), post_title =
replace(post_title, '‘', "'");

update wp_posts set post_content =
replace(post_content, 'Â', ""), post_title =
replace(post_title, 'Â', "");

update wp_posts set post_content =
replace(post_content, '–', "--"), post_title =
replace(post_title, '–', "--");

That’s it. All abnormal strings in post_content and post_title have been globally replaced in the WordPress database.

Categories
Computer & Internet Literacy

Change Default Graphics Processor / GPU in Windows (NVIDIA)

If you have two different GPUs or graphics processors in your laptop, chances are Windows could be using the wrong one performance wise. Benchmarking always come out with the inferior one with a lower score.

How to change the default graphics card in Windows for an Nvidia GPU?

Search “nvidia control panel” in Start, click “Manage 3D Settings“, and you can select the GPU you want by default in “Preferred graphics processor” drop down.

Categories
Linux Server Administration Tips

SMTP server telnet connection refused on Linux?

I was testing the WP Mail SMTP plugin to send emails in WordPress via SMTP servers but when it was trying to connect to the remote SMTP server, it kept getting error “Connection refused”.

So I tried:

telnet smtp.xxxx.com 587

To test the connection. Turned out my own server is preventing the outgoing request because of the permission denied error by CSF as I didn’t have enough privilege as an ordinary user of the server:

grep -i smtp_block /path/to/csf.conf

grep: /path/to/csf.conf: Permission denied

Needless to say, the telnet connection successfully went through to the remote SMTP server when I logged in as root.

So the solution is simple. Just add the user to /path/to/csf.conf for SMTP privilege:

SMTP_ALLOWGROUP = "mail,mailman,youruser"

That’s it. Now youruser is capable of connecting to remote SMTP servers.

Categories
Microsoft Windows Web Applications & Online Software

Office365 SMTP Send Emails as Shared Mailbox via smtp.office365.com

Go to Office.com admin center > Users > Active users.

Create a standalone user for the purpose of SMTP authentication, e.g. [email protected] with password XXYYZZ112233, as you don’t want to give the password of your existing users to apps (e.g. WordPress) that need to access your SMTP.

Edit the created account enabling SMTP authentication by Mail tab > Email apps > Manage email apps > Check “Authenticated SMTP” > Save changes.

SMTP account done.

Now, create a shared mailbox in Office 365 for the app to send email AS.

Go to Office.com admin center > Teams & groups > Shared mailboxes, and create a shared mailbox for your app, e.g. [email protected], with the newly created SMTP user as a member of it.

Wait 10 minutes or so for Office 365 to take this into effect so your new SMTP user [email protected] becomes a member of the shared mailbox [email protected].

Finally, you can use these as your SMTP details for your new app:

  • SMTP Host: smtp.office365.com
  • Encryption: TLS
  • Port: 587
  • SMTP Username: [email protected]
  • SMTP Password: XXYYZZ112233

And make sure to use the shared mailbox as From Email when you are sending, or Office 365 SMTP server will reject your request:

That’s it.

Categories
Programming Tips & Insights SQL / MySQL Tips and Tutorials

When to use NoSQL (e.g. MongoDB) and when to use SQL (e.g. MySQL)?

NoSQL is mostly about document databases while SQL is about relational databases.

  1. NoSQL vs. SQL
  2. Documents vs. Tables
  3. MongoDB vs. MySQL
  4. Property vs. Entity

The trick is 4: Property vs. Entity

Design your data models on a piece of paper.

Use MongoDB if …

If you see more trivial *entities* such as category, tag, brand, origin, etc. that are actually properties, go with NoSQL databases such as MongoDB because these are properties of documents. What you are trying to store is some kind of documents of these properties.

Use MySQL if …

If you see more real entities such as business, person, product, event, etc., go with a relational database such as MySQL because these are entities that should get tables on their own. What you are trying to store is a network of related entities.

Conclusion

Go with the solution that mandates the LEAST tables or document types so the structure is as simple as possible.

If you find the data structure becoming increasingly complex and difficult to maintain, you are probably using the wrong database technology.

Categories
Business and Marketing

9 Things to Look for When Purchasing B2B Email Lists

Email marketing has been considered a great tool to create leads and enhance sales for years. A recent forecast of Statista declares that the global revenue of the email marketing industry was 7.5 billion USD in 2020, and it will reach up to 17.9 billion USD by 2027. Similarly, the number of email users is also growing daily, and this number will cross 4.6 billion in 2025.

Thence, these figures show that the future of email marketing is bright if you are using the right marketing approaches. However, in the absence of a meaningful B2B email dataset, it would be hard for marketers to achieve their goals. Therefore, this article shares a complete guide about things to consider while purchasing a B2B email list.

Things to Consider When You Purchase B2B Email Lists

1. The Credibility of Email List Provider

The primary thing that matters a lot when you purchase a B2B email list is the credibility of the data vendor. To successfully run your email marketing campaign and get a high ROI, buying an email list from a highly regarded dataset provider is significant. In this regard, B2B companies should explore their working experience in a particular industry and reviews of their previous email list buyers.

By the way, for ease for B2B email list seekers, we are also representing one of the top B2B email list providers below:

AeroLeads—With renowned clients like IBM, Adobe and Gartner, AeroLeads is a superior choice to buy B2B email lists. It not only facilitates the users with email lists but also gives sufficient details about phone numbers, business addresses, etc. Its most popular data plan is ‘Climb’, and its monthly charges start from $149.

Usable Databases—If your target audience is from the United States, United Kingdom, Canada, and European countries, then The Usable Databases should be your primary choice.

It grants frequently updated email lists to B2B companies. The ROI rates of these datasets are also outstanding. With a money-back guarantee, this email list provider has been in business since 2008 and could be a good choice for B2B companies of all sizes.

PureB2B—This data vendor is also a big name in providing lead generation for B2B companies. Its lead generation section covers a variety of segments like in-market leads, B2B content syndication, B2B account intelligence, and much more. This globally renowned vendor has served 125 million technology buyers.

2. Check Regulatory Compliance for Email List

The data collection and usage laws are getting stricter day by day. Mainly, developed countries are trying to implement data privacy laws firmly. That is why it is essential to purchase B2B email lists from a vendor that offers a completely clean and compliant email database. First of all, it should be mentioned by the vendor that it gets the entire data with the permission of companies and doesn’t violate any data privacy law.

A data vendor should be compliant with the following rules & acts:

General Data Protection Regulation (GDPR)This European Union’s (EU) law provides the legal framework for gathering and processing data of individuals & businesses that operate in EU countries. This data protection act firmly emphasizes data security, lawfulness, retention, accuracy, and storage limits.

California Consumer Privacy Act (CCPA)This California-based law secures the consumer data of people who live in California state. CCPA questions the companies on how they are using the consumers’ personal information.

CAN-SPAM ActThis act mentions that marketing companies can’t send commercial emails, phone calls, and SMS to businesses and individuals without their consent. If anyone reports against such marketing campaigns, then the responsible company or individual will have to pay a fine of $16,000.

Canada’s Anti-Spam Legislation (CASL)To deal with electronic threats, cybercrimes, and spam activities, Canada confers a legal cover to its citizens with the name of CASL.

There could be several other regulations and acts that B2B email list vendors should comply with. The violation of these acts can severely damage your B2B marketing campaign and business.

3. Selection of Right Database

Now, if we talk about the types of databases, it is always recommended to choose niche-oriented email lists instead of general-purpose datasets. It is hard to find the desired data from ‘fit for all campaigns’ like email lists. Secondly, it is also an excellent choice to pick a single table from databases because of its ease of use.

4. Frequency of Data Updates

To increase engagement, sales, and ROI, it is vital to update the email lists regularly. Yes, it has been seen that businesses frequently change their contact credentials. So, it is also important to know how often your email list provider conducts such updates. B2B email buyers must inquire about dataset updates and are there any charges associated with these updates.

5. Refund Policy of Dataset Vendor

Another thing that you must investigate is the refund policy of the email list vendor. You should immediately ignore the dataset provider if it is not facilitating you with a fair refund policy. On the other hand, it is vital to carefully read all terms and conditions associated with email list databases’ refund policies. If these conditions suit you, then you can proceed with them.

6. Avoid Cheap B2B Email Lists

Although many startups and SMEs have limited funds to support their B2B email marketing campaigns, and they are not in a position to go with big budgets. But to get instant results from email marketing campaigns, they should ignore cheap or free B2B email lists. These cheap lists are usually inaccurate and out of date. With an appropriate strategy, you can surely get an ROI of $36 on the consumption of every $1 with a good dataset.

7. Analyze Data with the Help of Samples

Purchasing a B2B email list from a trusted vendor is not enough. Sales teams of B2B firms should also ask for a sample to analyze the success, deliverability, and ROI of these emails. With the help of a sample dataset, you can examine the following things:

  • A sample email list will make you aware of the deliverability rate of provided emails. Good email datasets providers claim about 99% email deliverability rate and successfully send the mails into the target customer’s inbox. This claim could be investigated with a sample list.
  • A sample list also discloses all contact details that are going to be a part of your email list. It is good to get B2B email lists with the full name of receipt, rank in the company, address and further details.
  • You can also send emails to sample email addresses to know about the engagement, return on investment (ROI) and sales rates. However, don’t forget to use an attractive and concise template and subject line while sending such testing mails.
  • Email list buyers should also take an authoritative agreement from the vendor that the final email dataset would be similar to the sample data.

8. Utilize Email Verification Tools

To examine the authenticity of emails, you can also utilize email verification tools. These tools could be applied to sample datasets to verify email lists. B2B email marketing experts should benefit from the following email verification tools before purchasing the email dataset:

Kickbox Email Verification—This is an ideal tool to validate the email dataset with a RESTful real-time email verification API. You can also test these APIs for different applications, including Python, Java, PHP, Ruby, and Node.js. This tool only charges $5 to verify 500 emails, so you can easily use it to test your B2B email list sample.

BriteVerify—It is another reliable email verification tool that aids in improving the ROI and sales of your email marketing projects. For 5,000 verifications, BriteVerify only takes $0.0080 per verification. Its price per verification reduces with an increment in the number of email verifications. This platform also deletes the data after 7 days to keep your information protected.

SendGrid—With more than 80,000 customers, SendGrid is basically an email delivery service. But you can benefit from its email address validation API to examine the deliverability ratio of the sample email dataset. For a certain limit, you can use this service for free of cost. However, to verify unlimited email addresses, you will have to consult with their sales team to ask about the charges.

Emailable—It is also a good email verification tool that comes with 99% accuracy and 50+ integrations. This platform enables the marketing agencies to automate their email verification process to know about the deliverable email addresses. Emailable can definitely tell you the deliverability ratio of your sample data.

9. Formats to Download Data

Nowadays, email datasets are used for various functions and integrated with numerous email marketing tools. That is why it is also necessary to know what formats your data vendor supports to download the email list. Your email list vendor should support formats like CSV, SQL, MySQL, PDF, MS Word, MS Excel, WordPress, LaTeX, XML, YAML, and Single Table Format.

It is better to ask about the supported formats from the data provider before purchasing the email list. You can also inquire about the extra charges associated with particular formats.

This article covers all necessary aspects that you must consider before purchasing a B2B email list. Hopefully, these things will assist you in getting more leads and sales for your campaigns.

Categories
Linux Server Administration Tips

Put process in background by nohup command in Linux

For example, a command like this could run a few days if there are so many images:

tar zcf xxxx.images.tgz *

So it’s best to put it in background when started, by nohup:

nohup tar zcf xxxx.images.tgz * > nohup.log 2>&1 &

Categories
Linux Server Administration Tips

Whitelist server IPs for SSH connection against ERROR – ssh: connect to host port: Connection refused

If you have multiple servers you’d probably need rsync to transfer files among servers via SSH. An error like this, however, will occur when CSF protects the servers against malicious SSH connection attempts:

ssh: connect to host example.com port 9999: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=x.x.x]

The solution is very simple. Just whitelist each server IP on the other server and vice versa:

csf -a 1.1.1.1

Wherein 1.1.1.1 is the other server. And perform the same:

csf -a 2.2.2.2

On the other server.

That’s it. Now you can freely SSH from and to the 2 servers.

Categories
Domains Manage Your Own Server

CloudFlare and SSH Connection Timeout

Switched one of our sites to CloudFlare DNS and in our code routines, we connect to the site via SSH by its domain as the host.

Apparently it kept timing out as we were connecting to the wrong IP resolved by CloudFlare DNS which wasn’t the real IP for our server at all.

So we had to switch to DNS Only at CloudFlare for the A record of the domain and everything is working correctly again.

It took us a while to figure it out. It’s a tricky one. 😉

Categories
Kavoir & Whatever

Archetypethemes.co Review: 5/5 Best Premium Shopify Theme I Know of Thus Far

I have started several Shopify stores that are now still online and making money for me since 2017. It’s been a terrific experience as Shopify has made so many things so simple after the golden old days when you had to provision and manage a server yourself with hand coded websites on your own garage computers.

Now I just find the perfect theme and install it on my Shopify store and I would have everything ready without worrying about nothing technicals or uptimes.

I used about 30 different themes since I started my first store and bought about 10. Up until now I can say the best ones are by Archetype Themes: Motion and Impulse, both of which I purchased for my stores.

Reason 1

Over 300 5-star reviews which is really rare among Shopify premium themes. Those users can’t be wrong.

Reason 2

I’m a perfectionist who changes and refines everything that doesn’t come good enough for me or the users, e.g. font sizes, color contrasting, checkout experiences, button sizes, page navigation easiness, etc..

The issue I found in a lot of themes in the market, be it for Shopify or WooCommerce, especially those at ThemeForest.net, is that they are made by designers who have no experience in eCommerce at all, and that the themes are actually bad in conversions.

They look good but don’t work well for human.

In most cases, I had to do a lot of customizations to get the theme right in user experiences so it doesn’t work against conversions in sales. However, surprisingly, I needed to do zero improvements to Archetype themes after examining and testing both of Motion and Impulse inside out.

Yes, zero, nothing at all. From my experience in eCommerce for the past 6 years, they did everything right in the first place.

Reason 3

Rich features and functionalities are the final reason why I loved the themes. Everything just works out of the box. Saves me a lot of time.

I also love about their flexible sections for promotions and pictures.

Conclusion

From my experience, these are absolutely the 5/5 themes for Shopify that you must get for your next store. Highly recommended by an enthusiastic user.

You may want to check out the stores I built with Motion and Impulse. One is ChicksHQ and the other is TheDepts.