- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- TutorialsWhat is Ajax preloading?
I’m trying to edit a page using TD Composer.
I created the new row and added a new element (raw HTML) but the item is not appearing correctly. I have created other elements, so I’m pretty sure I set up the element correctly.
I’m wondering if because my raw HTML has a script in it (it’s a scoreboard widget) that it’s being blocked.
If that’s the case, how could I add script to an element? The code is below:
<div class=”scorestream-widget-container” data-ss_widget_type=”horzScoreboard” data-user-widget-id=”37786″></div><script async=”async” type=”text/javascript” src=”https://scorestream.com/apiJsCdn/widgets/embed.js”></script>
I am using Apache with its theme and I have noticed that my instances in AWS are overloaded.
My configuration is with PHP7.3 and I have 256Mb of memory configured, I previously had 512M for php.
My web server is constantly falling despite having a load balancer with 5 instances of 8GB each.
-------------------------------------
/var/log/httpd/error_log
-------------------------------------
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
[Mon Feb 17 21:48:21.902158 2020] [php7:error] [pid 3913] [client 172.31.73.248:35628] PHP Fatal error: Out of memory (allocated 18874368) (tried to allocate 40960 bytes) in /var/app/current/wp-content/plugins/td-composer/legacy/common/wp_booster/td_util.php on line 1670, referer: https://lpderecho.pe/
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
[Mon Feb 17 21:48:22.037790 2020] [php7:error] [pid 3913] [client 172.31.84.215:56100] PHP Fatal error: Out of memory (allocated 35651584) (tried to allocate 40960 bytes) in /var/app/current/wp-content/plugins/td-composer/legacy/common/wp_booster/td_util.php on line 1670
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
My htacces
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} =on
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{SERVER_PORT} =443
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{HTTP:X-Forwarded-Proto} =https [NC]
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=W3TC_ENC:_gzip]
RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
RewriteRule .* - [E=W3TC_PREVIEW:_preview]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
RewriteCond %{REQUEST_URI} \/$
RewriteCond "%{ENV:PHP_DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
</IfModule>
# END W3TC Page Cache core
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
AddType text/css .css
AddType text/x-component .htc
AddType application/x-javascript .js
AddType application/javascript .js2
AddType text/javascript .js3
AddType text/x-js .js4
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType image/bmp .bmp
AddType application/java .class
AddType video/divx .divx
AddType application/msword .doc .docx
AddType application/vnd.ms-fontobject .eot
AddType application/x-msdownload .exe
AddType image/gif .gif
AddType application/x-gzip .gz .gzip
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType image/webp .webp
AddType application/json .json
AddType application/vnd.ms-access .mdb
AddType audio/midi .mid .midi
AddType video/quicktime .mov .qt
AddType audio/mpeg .mp3 .m4a
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg .mpe
AddType video/webm .webm
AddType application/vnd.ms-project .mpp
AddType application/x-font-otf .otf
AddType application/vnd.ms-opentype ._otf
AddType application/vnd.oasis.opendocument.database .odb
AddType application/vnd.oasis.opendocument.chart .odc
AddType application/vnd.oasis.opendocument.formula .odf
AddType application/vnd.oasis.opendocument.graphics .odg
AddType application/vnd.oasis.opendocument.presentation .odp
AddType application/vnd.oasis.opendocument.spreadsheet .ods
AddType application/vnd.oasis.opendocument.text .odt
AddType audio/ogg .ogg
AddType application/pdf .pdf
AddType image/png .png
AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
AddType audio/x-realaudio .ra .ram
AddType image/svg+xml .svg .svgz
AddType application/x-shockwave-flash .swf
AddType application/x-tar .tar
AddType image/tiff .tif .tiff
AddType application/x-font-ttf .ttf .ttc
AddType application/vnd.ms-opentype ._ttf
AddType audio/wav .wav
AddType audio/wma .wma
AddType application/vnd.ms-write .wri
AddType application/font-woff .woff
AddType application/font-woff2 .woff2
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A31536000
ExpiresByType text/x-component A31536000
ExpiresByType application/x-javascript A31536000
ExpiresByType application/javascript A31536000
ExpiresByType text/javascript A31536000
ExpiresByType text/x-js A31536000
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType image/bmp A31536000
ExpiresByType application/java A31536000
ExpiresByType video/divx A31536000
ExpiresByType application/msword A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType application/x-msdownload A31536000
ExpiresByType image/gif A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType image/webp A31536000
ExpiresByType application/json A31536000
ExpiresByType application/vnd.ms-access A31536000
ExpiresByType audio/midi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType audio/mpeg A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000
ExpiresByType video/webm A31536000
ExpiresByType application/vnd.ms-project A31536000
ExpiresByType application/x-font-otf A31536000
ExpiresByType application/vnd.ms-opentype A31536000
ExpiresByType application/vnd.oasis.opendocument.database A31536000
ExpiresByType application/vnd.oasis.opendocument.chart A31536000
ExpiresByType application/vnd.oasis.opendocument.formula A31536000
ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
ExpiresByType application/vnd.oasis.opendocument.text A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType application/pdf A31536000
ExpiresByType image/png A31536000
ExpiresByType application/vnd.ms-powerpoint A31536000
ExpiresByType audio/x-realaudio A31536000
ExpiresByType image/svg+xml A31536000
ExpiresByType application/x-shockwave-flash A31536000
ExpiresByType application/x-tar A31536000
ExpiresByType image/tiff A31536000
ExpiresByType application/x-font-ttf A31536000
ExpiresByType application/vnd.ms-opentype A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000
ExpiresByType application/vnd.ms-write A31536000
ExpiresByType application/font-woff A31536000
ExpiresByType application/font-woff2 A31536000
ExpiresByType application/vnd.ms-excel A31536000
ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/richtext text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon application/json application/vnd.ms-access video/webm application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
</IfModule>
<FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$">
FileETag MTime Size
<IfModule mod_headers.c>
Header unset Set-Cookie
</IfModule>
</FilesMatch>
<FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|TXT|XSD|XSL|XML)$">
FileETag MTime Size
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|WEBP|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|_TTF|WAV|WMA|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
FileETag MTime Size
<IfModule mod_headers.c>
Header unset Set-Cookie
</IfModule>
</FilesMatch>
<FilesMatch "\.(bmp|class|doc|docx|eot|exe|ico|json|mdb|webm|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|JSON|MDB|WEBM|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$">
<IfModule mod_headers.c>
Header unset Last-Modified
</IfModule>
</FilesMatch>
<IfModule mod_headers.c>
Header set Referrer-Policy "no-referrer-when-downgrade"
</IfModule>
# END W3TC Browser Cache
# BEGIN W3TC CDN
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
# END W3TC CDN
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<IfModule mod_substitute.c>
SubstituteMaxLineLength 10M
</IfModule>
Hi,
Usually this is a cache problem, please make sure that you clear all cache, also if you are using Cloudflare (CDN), make sure that is set as in our guide from here -> https://forum.tagdiv.com/cloudflare-cdn/
Let me know the results!
Thank you!
Hi, can u tell my why the theme is making so more copyes of a photo, in so many dimensions:
All this photos meaning more space and also my website is a little bit slow…
I cannot not identify the update of my theme from 9.2.2 to X .
How to check it?
This is the screenshots
Appearancehttps://aws1.discourse-cdn.com/envato/original/3X/f/e/fe63b13f156ebfc36cb251721a32abb7fadb6ecd.jpeg
Please help.
This is the view
Theme panel
If I use the embed code (provided by bannersnack) everything works fine:
<script type=”text/javascript”>
var bannersnack_embed = {“hash”:”bcmsv3mug”,”width”:728,”height”:90,”t”:1576583082,”userId”:8551676,”responsive”:true,”type”:”html5″};
</script>
<script type=”text/javascript” src=”//cdn.bannersnack.com/iframe/embed.js”></script>
…but in order to clear the bannersnack badge, I need to download the banner and use a standard <iframe> code to show the ad…but as you saw it does not really work…
Having great difficulty changing the background image of the mobile menu dropdown. It currently has the demo’s image. I believe I have identified the css:
.td-menu-background, .td-search-background {
background-image: url(‘http://secureservercdn.net/198.71.233.68/4a2.614.myftpupload.com/wp-content/uploads/2020/01/mobile-bg.jpg’);
}
But when I put a new url here, I still get the demo image. Please help!
Hi,
You can download it from here -> http://cdn.tagdiv.com/wp-content/uploads/2019/11/Newspaper-9.7.4.zip
Thank you!
How can I change the newspaper so that the posts are displayed in a wider image?
I want to make my posts about 700px wide
Please advise
Hello!
my website loading is very slow. same with the backend wp-admin. can you please check for me
https://thesmartinvestor.com.sg
ive setup CDN as well. please help
Hi,
The theme requirements need to be set as in our documentation from here -> https://forum.tagdiv.com/newsmag-requirements-for-newsmag/
There is no need to use CDN is is optional.
Please provide some more details and screenshots with the problem you are facing.
Thank you!
Thank you Calin, very much, I would like to know how to make the theme lighter, I have certain problems accessing the web, set the required parameters, except page speed,. The server has 8gb of ram and 8 cores. Could you check if the theme that the server overloads me has any code? The web is ro.com.uy. Is it necessary to use the cdn service?
Hi Vlad,
Thanks for the response. If this were isolated to just my production environment, that would be a quite logical approach to troubleshooting. However, I have seen many other threads in the support form (like this one) that talk about the same issue happening. I could search and link to them but I’m sure your team is well aware of them.
Interestingly, the search icon on the mobile version works as expected, sliding out from the right. It’s just the hamburger menu which is acting incorrectly (as Lucas above indicated through screenshots and which I confirm is happening on my site as well).
So, I’m trying to see if there are any commonalities between our environments, something that might indicate a conflict or issue. Off the top of my head, the possible conflicts I could see are:
– Using WP Rocket (caching)
– Using Cloudflare
– Using JS/CSS minification (do we need to exclude certain object from this)
– Using Jetpack
– Using a CDN
Unfortunately, setting up a staging environment (which I have) using CloudFlare, CDN, and JetPack would require paying for those services on a separate instance and are cost-prohibitive. In my staging (without those items), everything performed as expected, btw.
Hope this helps (you and others as well).
-HTD
I too have the same issue listed as #1 on the original post. This recently started happening. I was thinking it had to do with caching of the CSS/javascript. For me, it’s complicated to troubleshoot as I have many plugins as well as use CloudFlare, WP Rocket, and MaxCDN. Sometimes when I clear the caches/CDN, it fixes but then the issue happens on Safari, Chrome, Firefox, and Edge.
It would be great to understand the environments where people are having this issue (as I have seen other threads about this same thing – screenshot of #1 shows exactly what I am experiencing). Caching plugin? CloudFlare? CDN?
My site is https://hightechdad.com (but I’m continuing to troubleshoot so it may work or it may not).
Thx!
Hi,
From what I can see you have on desktop the mobile version, this problem usually appear because of the cache plugin or Cloudflare, if you are using these tools, please make sure that you are set the Cloudflare as in our documentation from here -> https://forum.tagdiv.com/cloudflare-cdn/ also we recommend using WP Super Cache: https://forum.tagdiv.com/cache-plugin-install-and-configure/
Hope this will help you!
Thank you!
Hi,
Please make sure that all the settings are like in our requirements, please follow the guide carefully
– https://forum.tagdiv.com/requirements-for-newspaper/
and please increase all requirements that are lower, and follow all steps.
If you are using Cloudflare ( CDN ) -> https://forum.tagdiv.com/cloudflare-cdn/
Let me know the results!
Thank you!
Hi,
If you need the Newspaper theme version 8.7.2 you can download it from here -> http://cdn.tagdiv.com/wp-content/uploads/2020/01/Newspaper-8.7.2.zip
Thank you!
Hello,
The social counter on my page is showing zero for Instagram. I have cleared the cache and purged the CDN files and changed the IG Account to another one to test and it still did not show up correctly. I am sending you my login information with a link back to this post.
Thank you!
After changing the theme, Google has discontinued its Crawl Errors API.
How to solve it
The share icon and text do not appear next to the share button.
Below are two pictures that show the first one.
The next one doesn’t show up.
https://cdn130.picsart.com/314954675116201.png
https://cdn130.picsart.com/314954675161201.png
I am using newspaper theme and tagDiv Mobile Theme also. I have set caching using WP Super Cache and I have set all caching settings according to the guide – > https://forum.tagdiv.com/cache-plugin-install-and-configure/ . By the way, I am using Cloudflare and I have also set Cloudflare settings according to the guide -> https://forum.tagdiv.com/cloudflare-cdn/
I also set Browser cache TTL to 1 month in cloudflare
Apart from that I have added the following 3 page rules in Cloudflare
https://www.MyDomain.com/wp-admin*
Security Level: High, Cache Level: Bypass, Disable Apps, Disable Performance
https://www.MyDomain.com/wp-login.php*
Security Level: I’m Under Attack, Cache Level: Bypass, Disable Apps, Disable Performance
https://www.MyDomain.com/*
Cache Level: Cache Everything, Origin Cache Control: On
I have also set cache control header in .htaccess . Below is the code
# BEGIN Caching
<ifModule mod_headers.c>
<filesMatch “\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$”>
Header set Cache-Control “max-age=2592000, public”
</filesMatch>
<filesMatch “\\.(css)$”>
Header set Cache-Control “max-age=604800, public”
</filesMatch>
<filesMatch “\\.(js)$”>
Header set Cache-Control “max-age=216000, private”
</filesMatch>
<filesMatch “\\.(xml|txt)$”>
Header set Cache-Control “max-age=216000, public, must-revalidate”
</filesMatch>
<filesMatch “\\.(html|htm|php)$”>
Header set Cache-Control “max-age=1, private, must-revalidate”
</filesMatch>
</ifModule>
# END Caching
My response header for jpeg file is as below:
accept-ranges: bytes
cache-control: max-age=2592000, public
cache-control: no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0
cf-cache-status: BYPASS
cf-ray: 54988bd04b09c91c-HYD
content-length: 104228
content-type: image/jpeg
date: Mon, 23 Dec 2019 07:15:46 GMT
expect-ct: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
last-modified: Sun, 22 Dec 2019 07:58:16 GMT
server: cloudflare
status: 200
vary: Accept-Encoding
I have checked with my host and they have replied saying –
We checked the website and it’s currently using CloudFlare service for DNS and caching.
Also, the header reply for client’s site is also returned by CloudFlare server. What we can advise for this case is to correctly configure WordPress website for using CloudFlare for the headers to be correct.
Somehow Cloudflare’s CDN is not caching images and other files(cf-cache-status: BYPASS). Am I missing something here?
Hi,
On our website we’re running Varnish caching.
Sometimes, the websites seems to randomly switch to a mobile layout and stay that way:
When we reset Varnish cache, the website switches to the normal layout.
Hello,
Is look that you have a problem with Access-Control-Allow-Origin (CORS origin)
-> http://prntscr.com/q2n2a5 you can fix this by follow the steeps from this article -> https://crunchify.com/how-to-fix-access-control-allow-origin-issue-for-your-https-enabled-wordpress-site-and-maxcdn/
Also please make sure that you do not have a plugin conflict, please deactivate ALL plugins except tagDiv Composer, also if you are using child theme or cache plugin, deactivate them, clear all cache and try again.
Hope this will help!
Thank you!
Hi,
1) There are a few gif images that need to be optimized.
2) Images work better with Cloudflare + Lazy Load by WP Rocket
For page: https://www.pinkluggageabroad.com/riad/
Featured image on this page is of 1.95MB that’s big and is not being served by Jetpack CDN.
After optimizing all images, you must purge all cache (Server level cache, WP Super cache.)
I hope you will find this helpful.