Eduma Learnpress CSS custom

Custom CSS Support

You want to hide/ display some things on the demo? It’s easy by using Custom CSS. (Add the Custom CSS to Appearance >> Customize >> General >> Custom CSS & JS >> Custom CSS)

1. Keep the menu sticky when scrolling the page:

#masthead.affix.menu-hidden {
-webkit-transform: inherit;
-moz-transform: inherit;
-ms-transform: inherit;
-o-transform: inherit;
}

2. Remove the overlay on top image for all pages:

.top_site_main>.overlay-top-header {
display: none;
}

3. Display WooCommerce cart icon in the header for all pages:

body:not(.woocommerce):not(.woocommerce-page) .widget_shopping_cart {
display: inline-block;
}

4. Display Footer Bottom on Homepage only:

body:not(.home) footer#colophon.has-footer-bottom {
margin-bottom: 0!important;
}

5. Remove Footer Bottom on Homepage only:

body.home footer#colophon.has-footer-bottom {
margin-bottom: 0;
}

6. Remove Course Features box:

#tab-overview .thim-course-info {
display: none;
}
#tab-overview .thim-course-content {
width: -webkit-calc(100% - 0px);
border-right: none;
}

7. Remove price of the courses + text “Free”:

.thim-course-megamenu .course-price .value, .thim-course-grid .course-item .thim-course-content .course-meta>div.course-price .value, body .learn-press .course-payment .course-price .value, .learn-press .thim-course-landing-button .course-price .value, .widget-area .thim-course-list-sidebar .course-price .value, .thim-course-list .course-item .thim-course-content .course-price .value {
display: none;
}

8. Remove text “Free”:

.thim-course-grid .course-item .thim-course-content .course-meta>div.course-price .value.free-course, .widget-area .thim-course-list-sidebar .course-price .value.free-course, .thim-course-list .course-item .thim-course-content .course-price .value.free-course, .thim-course-megamenu .course-price .value.free-course, body .learn-press .course-payment .course-price .value.free-course, .learn-press .thim-course-landing-button .course-price .value.free-course {
display: none;
}

9. Remove Take This Course button:

.learn-press .form-purchase-course .button-enroll-course {
display: none;
}

10. Remove Buy This Course button:

body .learn-press form.course-external-link, body .learn-press form.purchase-course .button-purchase-course {
display: none;
}

11. Remove related courses (You May Like section)

.thim-ralated-course {
display: none;
}

12. Remove related posts (You Also May link section):

.related-archive {
display: none;
}

13. Remove Author from course thumbnails: (http://prntscr.com/ilpxjj)

.thim-course-grid .course-item .thim-course-content .course-author {
display: none;
}

14. Remove enrolled student: (http://prntscr.com/ilqrv9)

.thim-course-grid .course-item .thim-course-content .course-meta .course-students, #tab-course-description .thim-course-info .students-feature, .thim-course-list .course-item .thim-course-content .course-meta .course-students {
display: none;
}

15. Set full width for Lesson content:

#body.course-item-popup #learn-press-content-item .content-item-wrap .comments-area, body.course-item-popup #learn-press-content-item .content-item-wrap .content-item-summary, body.course-item-popup #learn-press-content-item .content-item-wrap .course-item-nav, body.course-item-popup #learn-press-content-item .content-item-wrap .edit-course-item-link, body.course-item-popup #learn-press-content-item .content-item-wrap .learn-press-content-protected-message, body.course-item-popup #learn-press-content-item .content-item-wrap .message {
max-width: 1200px;
}

16. Change link color in the site content:

.site-main .entry-content a {
color: #000000;
}

17. Display Toolbar on mobile:

@media (max-width: 480px) {
#toolbar .thim-have-any-question {
display: block;
}
}

18. Remove Events Participants (http://prntscr.com/l7fecq)

.tp-event-organizers {
display: none;
}

19. Remove the top image for all pages (http://prntscr.com/lqwpp0)

.top_site_main {
display: none;
}

How to Speed up WordPress with Redis Caching | Redis Optimizador

How to Speed up WordPress with Redis Caching

ANH TRANDECEMBER 28, 2018GUIDEHome / Blog / Guide / How to Speed up WordPress with Redis Caching

How to speed up WordPress using Redis cache is such a simple thing. Redis is an in-memory database which can be used as a data store or cache. Redis presents itself as an ideal solution to speeding up WordPress and any other software which supports Redis cache. In this article, we’re going to show you how to set up a WordPress caching with Redis on a Linux VPS.

How to Speed up WordPress with Redis Caching

1. Installing Redis on Linux VPS

We suppose that WordPress has been installed already on your system, so this step will be skipped.

It’s simple to install Redis. If you’re using a Ubuntu VPS, run this command to install Redis:

apt-get install redis-server

If you’re using a CentOS VPS, you can use the following command to install Redis:

yum install redis

Make sure you activated repo EPEL (Extra Packages for Enterprise Linux) on your server.

Start and activate Redis on system boot.

systemctl start redis.service
systemctl enable redis.service

2. Installing Redis PHP Extension on Linux VPS

In order to use Redis as an object cache for your WordPress site, you need to install Redis PHP extension. It will allow WordPress to contact the Redis key-value store.

Run this command on Ubuntu:

apt-get install php-redis

On CentOS, run the following command:

yum install php-pecl-redis

3. Installing Redis Caching Plugin in WordPress

Log in to your WordPress dashboard and navigate to Plugins → Add new. Search for Redis and install Redis Object Cache plugin from the list. When the installation finishes, navigate to Plugins and activate the Redis Object Cache.Redis Object Cache

Author(s): Till Krüss

Current Version: 1.4.3

Last Updated: May 7, 2019

redis-cache.1.4.3.zip92%Ratings50,000+InstallsWP 3.3+Requires

Then navigate to Settings → Redis and click on Enable Object Cache to enable the object caching in WordPress. The default configurations should work out of the box with the default Redis listening address being 127.0.0.1 and the default listening port being 6379.

4. Verify Redis Caching on WordPress

To check whether the WordPress caching works properly with Redis, you can connect to your server via SSH and run the following command:

redis-cli monitor

By using the Redis monitor, you will be likely to see all the requests processed by the Redis server which will enable you to understand what is happening to the database. The output should be similar to the following:

# redis-cli monitor
OK
1510415208.863435 [0 127.0.0.1:50076] "PING"
1510415208.865491 [0 127.0.0.1:50076] "GET" "wp_:default:is_blog_installed"
1510415208.870259 [0 127.0.0.1:50076] "GET" "wp_:options:notoptions"
1510415208.870433 [0 127.0.0.1:50076] "GET" "wp_:options:alloptions"
1510415208.871197 [0 127.0.0.1:50076] "GET" "wp_:site-options:1:notoptions"
1510415208.875126 [0 127.0.0.1:50076] "GET" "wp_:options:uninstall_plugins"
1510415208.882241 [0 127.0.0.1:50076] "GET" "wp_:wordfence:alloptions"
1510415208.913368 [0 127.0.0.1:50076] "GET" "wp_:site-options:1:notoptions"
1510415208.913547 [0 127.0.0.1:50076] "GET" "wp_:site-options:1:notoptions"
1510415208.916283 [0 127.0.0.1:50076] "GET" "wp_:site-options:1:notoptions"
1510415208.916434 [0 127.0.0.1:50076] "GET" "wp_:site-options:1:notoptions"
1510415208.947299 [0 127.0.0.1:50076] "GET" "wp_:site-options:1:notoptions"
1510415208.947480 [0 127.0.0.1:50076] "GET" "wp_:options:can_compress_scripts"
1510415208.947637 [0 127.0.0.1:50076] "GET" "wp_:site-options:1:notoptions"
1510415208.954565 [0 127.0.0.1:50076] "GET" "wp_:posts:last_changed"

That means Redis is working for your WordPress website. From now on, whenever you get option or post meta, WordPress will check from the Redis cache first. If it doesn’t find what it needs, then it will make a database call. So it reduces the load on your database quite a lot.

Cambio de password de Administrador por RDP de un Window Server 2012 RD

Changing a server’s root or Administrator password

How Do I change my server’s root and admin passwords?

Your server operating system will have a main user that has access to all administrative functions on the server. These passwords can be changed at any time. Depending on the operating system, the process is slightly different.

Step 1

Use Remote desktop to log into your server with the username of Administrator and your Administrator Operating System Password.

Image

Step 2

Once you are connected to your server and logged in as Administrator, click [Control]+[Alt]+[End] on your keyboard to open your security pop up box.

Step 3

Click the button marked Change Password.

Change Password

Step 4

Enter your current password, then enter and confirm your new password in the text boxes provided.

Click on the arrow button to confirm the change.

New Password

Step 5

API WordPress URL con Jetpack

Sitios en WordPress con Jetpack que estén dentro de un directorio se debe obtener los posts del API con la siguiente URL:

https://public-api.wordpress.com/rest/v1/sites/www.segui.gob.ar::sitio/posts/

donde /subdirectorio/post se reemplaza por ::subdirectorio/post

HOW TO INSTALL PURE-FTPD ON CENTOS 6.4 | Instalar Pure-FTP en Centos6

HOW TO INSTALL PURE-FTPD ON CENTOS 6.4

This article teaches you how to install free ftp server Pure-FTPd on CentOS 6 and how to configure and use it so you can access your server via ftp connection using your favorite ftp client (e.g:FileZilla). The main reason why I post this article is because a friend of mine asked me why couldn’t he access his server using FileZilla. The answer is simple, that’s because he didn’t install any ftp server on his VPS. FileZilla is an ftp server installed in client computer while the VPS is not accessible via FTP without any FTP server installed. Yet, CentOS is not coming with FTP server installed by default and even if by any chance you found it installed, you still have to configure it.

WHAT IS PURE-FTPD?

Pure-FTPd is a free (BSD), secure, production-quality and standard-conformant FTP server. It doesn’t provide useless bells and whistles, but focuses on efficiency and ease of use. It provides simple answers to common needs, plus unique useful features for personal users as well as hosting providers.

Why Pure-FTPd?

Because it is actively supported, and it was always designed with security in mind, and the code is always re-audited as new kind of vulnerabilities are discussed.

Are there any other alternatives?

Yes there are. Try Pro-FTPd and vsftpd (how to install vsftpd).

HOW TO INSTALL PURE-FTPD ON CENTOS 6?

The guide is below. But first, read some prerequisites:

WHAT YOU’LL NEED?

  1. A Linux server running CentOS 6. In this guide I use CentOS 6.4 x64 by DigitalOcean.
  2. You better firstly setup LAMP or LNMP on it.
  3. You’ll also need an FTP client like FileZilla installed on your computer. This is for testing purpose (and you’ll really need this once you build your site)
  4. A skill to use SSH and basic Unix commands (I’m sure you have this already).
  5. About 15 minutes of your time

A. INSTALLING PURE-FTPD SOFTWARE ON CENTOS SERVER

Step 1 – Login to your server and follow my previous guide about Basic setup for CentOS before you build a live web server. You may and may not follow that tutorial but if you followed, it will give you some basic security tweak to your server.

Before you proceed to the next steps, it is better to explain that all commands in this tutorial are written without the “sudo” prefix. However if you disabled root login and you logged in using another username with root privilege, you can add the “sudo” prefix all by your self. Alternatively you can simply type su, hit Enter and type in your password twice to switch login as root.

switch-root-login

You may also need to type this command to go to the root directory:

1
cd ~

Step 2 – Pure-FTPd is not available by default in CentOS and you have to grab it from another repository. You have to enable the RPMforge and EPEL repositories on our CentOS. So go ahead add the repo:

1
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*

then

1
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

now..

1
2
3
cd /tmp
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

However If the above link doesn’t work anymore, you can find the current version of rpmforge-release here: http://packages.sw.be/rpmforge-release/.

This repo will also give you more benefit:

1
rpm --import https://fedoraproject.org/static/0608B895.txt

then

1
2
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

next, update yum:

1
yum update

Each time yum asks you to confirm, simply type Y then hit Enter.

Step 3 – Now install Pure-FTPd via yum using this command:

1
yum install pure-ftpd

screenshot:

yum install pureftpd

B. CONFIGURING PURE-FTPD (POST INSTALL)

Step 1 – Go to Pure-FTPd config folder:

1
cd /etc/pure-ftpd/

Step 2 – Next, edit the config file "pure-ftpd.conf": (in this example I use Nano editor).

1
nano -w pure-ftpd.conf

Step 3 – Once Nano editor appears with pure-ftpd.conf file ready for editing, now make adjustment to several lines as below:

3.1. Look for #UnixAuthentication and uncomment that line (remove the # symbol):

unixauth

3.2. Then change No in VerboseLog to yes.

verboselog

3.3. Uncomment the PureDB line:

purdedb

3.4. Uncomment the CreateHomeDir line

createhomedir

Step 4 – Now create ftp user or aka virtual user used to login to your server. And the command syntax is:

1
pure-pw useradd ftpuser -u user -g group -d /var/www/domain.com/public_html

where:

  1. ftpuser is username you can use it to login to your server via ftp.
  2. user is a Unix user. If you didn’t created one yet, you can also use root.
  3. group is a Unix group. If you didn’t created one yet, you can also use root.
  4. /var/www/domain.com/public_html is default document root folder of your site. This is where the ftp user will have access to once logged in.

Obviously you have to change those parts to suite your own. In my example is:

1
pure-pw useradd servermom -u sawiyati -g sawiyati -d /var/www/servermom.com/public_html

Once hit Enter, you’ll then be asked to define new password for the user. Enter it twice for confirmation.

Step 5 – Finally, issue this command:

1
pure-pw mkdb

screenshot for step 4 and 5:

purepw

C. USING FTP TO ACCESS YOUR SERVER

Step 1 – Once you’ve done making some adjustments to pure-ftpd configuration, now you better firstly restart the ftp service:

1
service pure-ftpd restart

screenshot

restart ftp

Don’t panic if you see [FAILED] message in when the system tried to stop pure-ftpd. It happens because pure-ftpd service is not yet started. The point here is the [OK] message when starting.

Step 2 – Now open up your favorite ftp client like FileZilla then enter the detail:

  • Host : Enter your server’s IP or hostname (if you’ve added A record to it in your DNS).
  • Username : Use what you defined in step 4 section B above.
  • Password : Use what you defined in step 5 section B above.
  • Port : use Port 21

Once done hit the Connect button. screenshot:

using filezilla

Step 3 – You’ll finally see the “Status:Directory listing successful” message indicating you are now logged in.

filezilla ftp

That’s it. I’m sure you knew what you have to do from here. Enjoy..

OPTIONAL

Issue this command to make sure pure-ftpd service will be automatically started every time your server reboot:

1
chkconfig --levels 235 pure-ftpd on

Also, if you created other virtual users (and passwords) – see section B step 4 – make sure you issue this command:

1
pure-pw mkdb

You have to issue that command every time you add a virtual user.

Usar Let’s Encrypt con CPanel WHM

Para añadir la funcionalidad de SSL gratuito que ofrece Let’s Encrypt a través de CPanel WHM se debe hacer lo siguiente:

Installation

To install the plugin, perform the following steps:

  1. Log in to the command line via SSH as the root user.
  2. Run the following command:
    /scripts/install_lets_encrypt_autossl_provider

To disable and uninstall the Let’s Encrypt plugin, run the /usr/local/cpanel/scripts/uninstall_lets_encrypt_autossl_provider command.

Luego, dentro del panel del WHM en AutoSSL se activa «Let’s Encrypt» y así cada cuenta nueva creada tendrá su certificado SSL en forma gratuita.

Saludos,

Icecast 2 con SSL

Primero que nada:

# yum groupinstall «Development Tools»
# yum install -y curl-devel libtheora-devel libvorbis-devel libxslt-devel speex-devel libxslt

Bajar ultima version
# wget http://downloads.xiph.org/releases/icecast/icecast-x.x.x.tar.gz

Extraemos:
# tar xf icecast-2.3.3.tar.gz
# cd icecast-2.3.3

configure:

# ./configure –prefix=/opt/icecast/2.3.3  # editar a gusto el destino
# make
# make install

Configuracion: icecast.xml

<icecast>
<!– location and admin are two arbitrary strings that are e.g. visible
on the server info page of the icecast web interface
(server_version.xsl). –>
<location>ARG</location>
<admin>info@arcast.tv</admin>

<!– IMPORTANT!
Especially for inexperienced users:
Start out by ONLY changing all passwords and restarting Icecast.
For detailed setup instructions please refer to the documentation.
It’s also available here: http://icecast.org/docs/
–>

<limits>
<clients>20000</clients>
<sources>1</sources>
<queue-size>524288</queue-size>
<client-timeout>30</client-timeout>
<header-timeout>15</header-timeout>
<source-timeout>10</source-timeout>
<!– If enabled, this will provide a burst of data when a client
first connects, thereby significantly reducing the startup
time for listeners that do substantial buffering. However,
it also significantly increases latency between the source
client and listening client. For low-latency setups, you
might want to disable this. –>
<burst-on-connect>1</burst-on-connect>
<!– same as burst-on-connect, but this allows for being more
specific on how much to burst. Most people won’t need to
change from the default 64k. Applies to all mountpoints –>
<burst-size>65535</burst-size>
</limits>

<authentication>
<!– Sources log in with username ‘source’ –>
<source-password>PASSWORD</source-password>
<!– Relays log in with username ‘relay’ –>
<relay-password>PASSWORD</relay-password>

<!– Admin logs in with the username given below –>
<admin-user>USER</admin-user>
<admin-password>PASSWORD</admin-password>
</authentication>

<!– set the mountpoint for a shoutcast source to use, the default if not
specified is /stream but you can change it here if an alternative is
wanted or an extension is required
<shoutcast-mount>/live.nsv</shoutcast-mount>
–>

<!– Uncomment this if you want directory listings –>
<!–
<directory>
<yp-url-timeout>15</yp-url-timeout>
<yp-url>http://dir.xiph.org/cgi-bin/yp-cgi</yp-url>
</directory>
–>

<!– This is the hostname other people will use to connect to your server.
It affects mainly the urls generated by Icecast for playlists and yp
listings. You MUST configure it properly for YP listings to work!
–>
<hostname>arcast.com.ar</hostname>

<!– You may have multiple <listener> elements –>
<listen-socket>
<port>8100</port>
<!– <bind-address>192.99.38.174</bind-address> –>
<!– <shoutcast-mount>/stream</shoutcast-mount> –>
</listen-socket>
<!–
<listen-socket>
<port>8080</port>
</listen-socket>
–>

<listen-socket>
<port>8443</port>
<ssl>1</ssl>
</listen-socket>

<!– Global header settings
Headers defined here will be returned for every HTTP request to Icecast.

The ACAO header makes Icecast public content/API by default
This will make streams easier embeddable (some HTML5 functionality needs it).
Also it allows direct access to e.g. /status-json.xsl from other sites.
If you don’t want this, comment out the following line or read up on CORS.
–>
<http-headers>
<header name=»Access-Control-Allow-Origin» value=»*» />
</http-headers>

<!– Relaying
You don’t need this if you only have one server.
Please refer to the config for a detailed explanation.
–>
<!–<master-server>127.0.0.1</master-server>–>
<!–<master-server-port>8001</master-server-port>–>
<!–<master-update-interval>120</master-update-interval>–>
<!–<master-password>hackme</master-password>–>

<!– setting this makes all relays on-demand unless overridden, this is
useful for master relays which do not have <relay> definitions here.
The default is 0 –>
<!–<relays-on-demand>1</relays-on-demand>–>

<!–
<relay>
<server>127.0.0.1</server>
<port>8080</port>
<mount>/example.ogg</mount>
<local-mount>/different.ogg</local-mount>
<on-demand>0</on-demand>

<relay-shoutcast-metadata>0</relay-shoutcast-metadata>
</relay>
–>

<!– Mountpoints
Only define <mount> sections if you want to use advanced options,
like alternative usernames or passwords
–>

<!– Default settings for all mounts that don’t have a specific <mount type=»normal»>.
–>
<!–
<mount type=»default»>
<public>0</public>
<intro>/server-wide-intro.ogg</intro>
<max-listener-duration>3600</max-listener-duration>
<authentication type=»url»>
<option name=»mount_add» value=»http://auth.example.org/stream_start.php»/>
</authentication>
<http-headers>
<header name=»foo» value=»bar» />
</http-headers>
</mount>
–>

<!– Normal mounts –>
<!–
<mount type=»normal»>
<mount-name>/example-complex.ogg</mount-name>

<username>othersource</username>
<password>hackmemore</password>

<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<burst-size>65536</burst-size>
<fallback-mount>/example2.ogg</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<intro>/example_intro.ogg</intro>
<hidden>1</hidden>
<public>1</public>
<authentication type=»htpasswd»>
<option name=»filename» value=»myauth»/>
<option name=»allow_duplicate_users» value=»0″/>
</authentication>
<http-headers>
<header name=»Access-Control-Allow-Origin» value=»http://webplayer.example.org» />
<header name=»baz» value=»quux» />
</http-headers>
<on-connect>/home/icecast/bin/stream-start</on-connect>
<on-disconnect>/home/icecast/bin/stream-stop</on-disconnect>
</mount>
–>

<!–
<mount type=»normal»>
<mount-name>/auth_example.ogg</mount-name>
<authentication type=»url»>
<option name=»mount_add» value=»http://myauthserver.net/notify_mount.php»/>
<option name=»mount_remove» value=»http://myauthserver.net/notify_mount.php»/>
<option name=»listener_add» value=»http://myauthserver.net/notify_listener.php»/>
<option name=»listener_remove» value=»http://myauthserver.net/notify_listener.php»/>
<option name=»headers» value=»x-pragma,x-token»/>
<option name=»header_prefix» value=»ClientHeader.»/>
</authentication>
</mount>
–>

<fileserve>1</fileserve>

<paths>
<!– basedir is only used if chroot is enabled –>
<basedir>/home/arcast/am750icecast/share/icecast</basedir>

<!– Note that if <chroot> is turned on below, these paths must both
be relative to the new root, not the original root –>
<logdir>/home/arcast/icecast/</logdir>
<webroot>/home/arcast/icecast/share/icecast/web</webroot>
<adminroot>/home/arcast/icecast/share/icecast/admin</adminroot>
<!– <pidfile>/home/arcast/icecast/share/icecast/icecast.pid</pidfile> –>

<!– Aliases: treat requests for ‘source’ path as being for ‘dest’ path
May be made specific to a port or bound address using the «port»
and «bind-address» attributes.
–>
<!–
<alias source=»/foo» destination=»/bar»/>
–>
<!– Aliases: can also be used for simple redirections as well,
this example will redirect all requests for http://server:port/ to
the status page
–>
<alias source=»/» destination=»/status.xsl»/>
<!– The certificate file needs to contain both public and private part.
Both should be PEM encoded.–>
<ssl-certificate>/home/arcast/am750icecast/share/icecast/icecast.cert</ssl-certificate>

</paths>

<logging>
<accesslog>access.log</accesslog>
<errorlog>error.log</errorlog>
<!– <playlistlog>playlist.log</playlistlog> –>
<loglevel>3</loglevel> <!– 4 Debug, 3 Info, 2 Warn, 1 Error –>
<logsize>10000</logsize> <!– Max size of a logfile –>
<!– If logarchive is enabled (1), then when logsize is reached
the logfile will be moved to [error|access|playlist].log.DATESTAMP,
otherwise it will be moved to [error|access|playlist].log.old.
Default is non-archive mode (i.e. overwrite)
–>
<!– <logarchive>1</logarchive> –>
</logging>

<security>
<chroot>0</chroot>
<!–
<changeowner>
<user>nobody</user>
<group>nogroup</group>
</changeowner>
–>
</security>
</icecast>

Dentro del config, está la sección de SSL, donde le indivamos donde va a estar el certificado.
Se debe incluir, la KEY y el CERT para que pueda validarlo.

Por otro lado, otro detalle a prestar atencion, es a que los directorios que seleccionemos dentro de la configuración deben existir todos y estar creados. (importante)

Otra particularidad es que se selecciona un puerto para el HTTP y otro para el HTTPs

Ejecutamos con:
# ./icecast -b -c /ruta/al/icecast.xml

😀

Saludos