chown: invalid user: `www-data?www-data’

When updating wordpress, I got the following error message: chown: invalid user: `www-data?www-data’ Run the following linux command: chown www:www -R /home/wwwroot/www.cheapglasses123.com/

How to Disable Auto Embed Script for WordPress 5.4+ – wp-embed.min.js

From the post body we can find the following code: <blockquote class=”wp-embedded-content” data-secret=”Gp5UKmVoxk”><a href=”https://www.cheapgalsses123.com/”>Cheap Glasses</a></blockquote> <iframe class=”wp-embedded-content” style=”position: absolute; clip: rect(1px, 1px, 1px, 1px);” title=”“Welcome” — Asia Actual” src=”https://www.cheapgalsses123.com/embed/#?secret=Gp5UKmVoxk” width=”600″ height=”338″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” sandbox=”allow-scripts” data-secret=”Gp5UKmVoxk”></iframe> And we can find the following code at footer: <script src=’https://kingphp.com/wp-includes/js/wp-embed.min.js?ver=5.4.1′></script> So we need 2 steps to remove […]

Redirect HTTP to HTTPS in Nginx

Before we redirect all http to https in Nginx, we should have installed an SSL certificate successfully. server { listen 80 default_server; server_name _; return 301 https://$host$request_uri; } This listens on port 80. It’s also the port 80 default server. It’s assumed that it’s the only server block listening on port 80. The server_name is […]

How can I change the default product images sizes on Magento ver. 2.3.5-p1

Magento 2.3.5 uses the file called view.xml which is maintained at the theme level of the application. So for example, if you are using the default theme luma you should find the view.xml under vendor/magento/theme-frontend-luma/etc/view.xml In this file, you would see <images/> node inside the <media> node. public_html/cheapglasses123.com/vendor/magento/theme-frontend-luma/etc/view.xml The dimension of the images is maintained […]

Invalid input datetime format of value: Magento ver. 2.3.5-p1

I have installed Magento ver. 2.3.5-p1 , the main shop is https://www.eyewearcanada.com , I also have set up a USA shop, the domain name is https://www.cheapglasses123.com. I add a new product via https://www.eyewearcanada.com , the product can be added, and display properly when I edit this product and save it, I got the wrong message: […]

Let’sEncrypt: It seems the CA server is busy now

Today I install the free ssl of Let’sEncrypt for dreamglasses.com, and meet the following error: It seems the CA server is busy now. I checked the installation error log and got the following information from https://curl.haxx.se/libcurl/c/libcurl-errors.html curl: (35) SSL connect error When we use curl to visit https, nss is too old, so I upgrade […]

How to Redirect your 404 page to the Home Page in WordPress?

Go to the root of your template, check if there is 404.php or not. If you can not find this file, just create one, then edit  404.php, add the following code: <?php header(“HTTP/1.1 301 Moved Permanently”); header(“Location: “.get_bloginfo(‘url’)); exit(); ?> Done! Simple ? Yes! I have tested the code for www.glassescare.com

Remove all links in a post content of wordpress

Edit functions.php,  add the following code: add_filter(‘the_content’, ‘removelink_content’,1); function removelink_content($content = ”) { preg_match_all(“#<a(.*?)>(.*?)</a>#i”,$content, $matches); $num = count($matches[0]);for($i = 0;$i < $num;$i++){ $content = str_replace($matches[0][$i] , $matches[2][$i] , $content); } return $content; }

Get Next / Prev 3 Posts in Relation to Current Post of WordPress

I have 7 prescription eyeglasses posts, like this: 1 – How to buy eyeglasses online? 2 – Why so many people buy prescription glasses online? 3 – How come it saves so much shopping glasses online? 4 – this is the current post 5 – Do you know the importance of prescription sunglasses? 6 – […]