import Adsense from ”@/components/Adsense.astro”;
워드프레스 설치 on AWS 라이트세일
AWS lightsail 워드프레스 사이트를 만들어 보자.
생성
너무 쉬워서 적어둘 것도 없다.
라이트세일 페이지에 가면 Create Instance… 하면
<figure class=“wp-block-image”></figure>그냥 생성하면 된다.
생성 후 따라하기
- 아래 명령어를 쳐서 패스워드를 확보한다.
cat $HOME/bitnami_application_password
2. 아래로 접속한다.
- 자신의아이피/wp-login
3. 위에 나온 패스워드로
user / 패스워드
접속한다. 사용자 ID는 ‘user’ 이다.
끝.
WordPress – Font Awesome 사용 하기
폰트 어썸을 사용해 볼라고,
템플릿 건드리고 이럴려구 하다가 플러그인 바로 있네
설치 후,
<figure class=“wp-block-image”></figure>바로 사용이 가능하다.
굿 💙
워드프레스 블로그를 시작합니다.
말도 많고 탈도 많은 블로그 올리기
티스토리의 많은 어려움을 뚫고 GitHub Pages로 시작을 해 보았지만,
정보를 업데이트하거나, 페이지를 수정하는데 한계를 느껴서
결국은 돌아돌아 워드프레스 블로그로 돌아왔습니다.
그래도 AWS 와 같은 훌륭한 클라우드 시대에 살고 있는 관계로 따로 서버를 입점시키거나, 웹 호스팅 서비스를 받는 대신 클릭 몇번으로 이런 개인 블로그를 만들 수 있는 시대에 고마워 합니다.
이런 저런 얘기를 많이 써봐야 할터인데, 일단 시작은 했네요
<figure class=“wp-block-image size-full”></figure>
워드프레스 – Instant Images 무료 이미지
참 모든 포스트에 아무런 이미지가 없으면 약간 개인 블로그에서는 보기 안좋다.
머라도 글과 유사한 이미지를 넣어두고 싶은데, 매번 무료 이미지 사이트 들어가서 찾고하는게 아주 귀찮다.
그래소 Instant Images 라는 플러그인을 설치해 봤다. 무료 이미지 사이트에서 검색해서 클릭만 하면 내 미디어로 다운로드 해서 쓸수 있게 해주니 아주 편리하다.
<figure class=“wp-block-image size-full”></figure>
워드프레스 테마 추천 – Blocksy 블록 방식 테마 강추
워드프레스 테마는 무조건 “Blocksy 테마” 를 사용하도록,
완전 무료 테마중에 최고봉이라고 볼 수 있는 깔끔함 그 자체 입니다.
아주 간단한 수정으로 아래와 같은 사이트가 탄생되었습니다. 깔끔해서 완전 만족
<figure class=“wp-block-image aligncenter size-large”></figure>사이트 꾸미는 것이 아주 단순하고, 무료 버전으로도 충분히 활용할 수 있습니다. 다른 테마들은 대부분 유료 기능이 필요한데 말이죠 이것은 그냥 무료면 충분합니다! 물론 개인적인 생각이지만 🙂
테마 홈페이지는 아래
https://creativethemes.com/blocksy/
애드센스에 관심있는 사람들이 많은데, 복잡한 워드프레스에 광고 코드를 넣으려면 이것저것 많이 살펴봐야 한다.
Blocksy 테마를 위한 가이드 문서도 마련되어 있다. 방문해서 읽어보시길
https://creativethemes.com/blocksy/blog/place-ads-wordpress-site/
플러그인으로 https://wordpress.org/plugins/advanced-ads/ 라는 것을 설치해서 활용하라고 나온다. 바로 설치해서 적용해 보이겠다.
<iframe class=“wp-embedded-content” data-secret=“dvnHZZNa7j” frameborder=“0” height=“282” marginheight=“0” marginwidth=“0” sandbox=“allow-scripts” scrolling=“no” security=“restricted” src=“https://wordpress.org/plugins/advanced-ads/embed/#?secret=38zGqAWryf#?secret=dvnHZZNa7j” style=“position: absolute; clip: rect(1px, 1px, 1px, 1px);” title=““Advanced Ads – Ad Manager & AdSense” — Plugin Directory” width=“500”></iframe>## 관련 사이트
- https://creativethemes.com/blocksy/
- https://wpguide.usefulparadigm.com/posts/1649
- https://wordpress.org/plugins/advanced-ads/
AWS 라이트세일 Bitnami WordPress 에 HTTPS 적용하기
<p>도메인을 붙여 뒀다면, 아주 쉽게 https 를 적용할 수 있다.</p>
<p>SSH 접속한 이후, 아래 명령을 치면 그냥 된다.</p>
<p>몇가지 질문이 나오지만 기본적인 도메인 정보가 넣고 Yes 몇번하면 된다.</p>
Prerequisites and limitations`
`- Make sure that the domain in the DNS records points to the IP address of your Lightsail instance.` `
- Certificate creation for wildcard domains isn’t possible using the bncert-tool.` `
<p>Run the following command to launch the Bitnami HTTPS configuration tool:</p>
sudo`` /opt/bitnami/bncert-tool````
For more information on using or downloading the HTTPS Configuration Tool, see Learn about the Bitnami HTTPS configuration tool on the Bitnami documentation website.`
`https://aws.amazon.com/premiumsupport/knowledge-center/linux-lightsail-ssl-bitnami/Bitnami Stacks for Amazon Lightsail에 SSL 인증서 설치닫기 Ciara 씨의 동영상을 통해 자세히 알아보기(6:52)aws.amazon.com`
`<p>예제로 내가 해놓은 것을 일단 로그만 남겨둔다</p>
The following domains were not included: www.devbj.com. Do you want to add them? [Y/n]: Y
----------------------------------------------------------------------------
Enable/disable redirections
Please select the redirections you wish to enable or disable on your Bitnami
installation.
Enable HTTP to HTTPS redirection [Y/n]: Y
Enable non-www to www redirection [Y/n]: n
Enable www to non-www redirection [y/N]: y
----------------------------------------------------------------------------
Changes to perform
The following changes will be performed to your Bitnami installation:
1. Stop web server
2. Configure web server to use a free Let's Encrypt certificate for the domains:
devbj.com www.devbj.com
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to: devbj.com
5. Enable HTTP to HTTPS redirection (example: redirect http://devbj.com to
https://devbj.com)
6. Enable www to non-www redirection (example: redirect www.devbj.com to
devbj.com)
7. Start web server once all changes have been performed
Do you agree to these changes? [Y/n]:
----------------------------------------------------------------------------
Create a free HTTPS certificate with Let's Encrypt
Please provide a valid e-mail address for`` which to associate your Let's Encrypt
certificate.
Domain list: devbj.com www.devbj.com
Server name: devbj.com
E-mail address []: bxxxxxx@gmail.com
The Let's Encrypt Subscriber Agreement can be found at:
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf
Do you agree to the Let's Encrypt Subscriber Agreement? [Y/n]:
----------------------------------------------------------------------------
Performing changes to your installation
The Bitnami HTTPS Configuration Tool will perform any necessary actions to your
Bitnami installation. This may take some time, please be patient.
----------------------------------------------------------------------------
Success
The Bitnami HTTPS Configuration Tool succeeded in modifying your installation.
The configuration report is shown below.
Backup files:
* /opt/bitnami/apache/conf/httpd.conf.back.202212160608
* /opt/bitnami/apache/conf/bitnami/bitnami.conf.back.202212160608
* /opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf.back.202212160608
* /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf.back.202212160608
* /opt/bitnami/apache/conf/vhosts/wordpress-vhost.conf.back.202212160608
Find more details in the log file:
/tmp/bncert-202212160608.log
If you find any issues, please check Bitnami Support forums at:
https://github.com/bitnami/vms
Press [Enter] to continue:
bitnami@ip-172-26-1-237:~$````
<p>끝.</p>
워드프레스 – 업로드 파일 타입 추가 on AWS Lightsail
AWS 라이트세일에서 제공하는 bitnami 워드프레스 머신에서
업로드 가능한 파일 확장자를 추가하려고 한다.
파일 용량은 이미 80메가로 충분히 되어 있어 변경할 필요성을 못 느낌!
일단 아래글을 참고
업로드 파일 확장자 추가하기
wp-config.php 에 아래와 같이 한 줄 추가하고
// 20221214 BJ add file upload
define('ALLOW_UNFILTERED_UPLOADS', true);
/* That's all, stop editing! Happy publishing. */
"wp-config.php" 209L, 4481B written
테마 소스 수정에서 functions.php 에 아래 내용을 또 추가하고,
/** 20221214 BJ add custom mimes */
<strong>function</strong> <strong>add_custom_mime_types</strong> ( $mimes ) {
$mimes['gz'] = 'application/gzip';
// $mimes['hwp'] = 'application/hangul';
<strong>return</strong> $mimes;
}
add_filter('upload_mimes', 'add_custom_mime_types');
서비스 재시작~~
bitnami@ip-:~/stack/wordpress$ sudo apachectl configtest
Syntax OK
bitnami@ip-:~/stack/wordpress$ sudo /opt/bitnami/ctlscript.sh restart
Restarting services..
sudo apachectl configtest
sudo /opt/bitnami/ctlscript.sh restart
<figure class=“wp-block-image size-large”></figure>간단하게 functions.php 파일 수정을 그림으로 캡쳐해둠
워드프레스 – AWS 라이트세일 bitnami 버전 php.ini 수정
Lightsail Bitnami WordPress 인스턴스에서 PHP 업로드 크기 제한을 늘리려면 어떻게 해야 합니까?
이게 내가 하고 싶은 질문인데, 완전 잘 해결책이 적혀있음
링크로 꼭 방문해서 습득하시길
https://aws.amazon.com/ko/premiumsupport/knowledge-center/lightsail-bitnami-wordpress-upload-limit/Lightsail Bitnami WordPress 인스턴스에서 업로드 크기 변경Lightsail Bitnami WordPress 인스턴스에서 PHP 업로드 크기 제한을 늘리려면 어떻게 해야 합니까? 최종 업데이트 날짜: 2021년 9월 23일 Amazon Lightsail Bitnami WordPress 인스턴스에 대용량 파일을 업로드하고 싶aws.amazon.com
아래 구문만 정독하셩
<div class=“devbj-side devbj-highlighted-wrappers” id=“devbj-1937354788” title=“Placement name: side; Ads: Ad created on 2022-12-23 23:07”><div class=“devbj-adlabel”>Advertisements</div><div class=“advads-edit-bar advads-edit-appear”><span class=“dashicons dashicons-edit”></span></div><script async="" crossorigin=“anonymous” src=“//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3059347231702682”></script><ins class=“adsbygoogle” data-ad-client=“ca-pub-3059347231702682” data-ad-format=“auto” data-ad-slot=“4788137659” data-full-width-responsive=“false” style=“display:block;“></ins><script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>``</div>1. /opt/bitnami/php/etc/php.ini 파일을 열고 upload_max_filesize 및 post_max_size를 늘립니다. vi 편집기와 같은 텍스트 편집기를 사용해 /opt/bitnami/php/etc/php.ini 파일에 액세스합니다.
# sudo vi /opt/bitnami/php/etc/php.ini
; Maximum size of POST data that PHP will accept.
post_max_size = 64M
; Maximum allowed size for uploaded files.
upload_max_filesize = 64M
4. 서비스를 다시 시작하기 전에 구성 세부 정보를 확인합니다.
<strong>sudo</strong> apachectl configtest
<strong>Syntax</strong> OK
5. 변경 사항을 적용하려면 서버를 다시 시작합니다.
<strong>sudo</strong> /opt/bitnami/ctlscript.sh restart
<figure class=“wp-block-image size-large”></figure>
워드프레스 – Contact Form 7 메일 기능 disable
워드프레스 플러그인 중에 사용자 폼을 위햇 Contact Form 7 을 설치해서 사용한다.
그런게, 메일 기능을 설정해야 제대로 동작하고, 메시지도 볼수 있고 이럴줄 알았는데
Flamingo 플러그인을 설치하고, 메일 기능을 disable 하면 정상적으로 사용이 가능했다.
아래 그림처럼 만든 Contact form에 추가 세팅에 메일 disable 을 추가하고,
<figure class=“wp-block-image aligncenter size-full”></figure>> skip_mail: on
해당 컨택 폼에서 메시지를 남기면
Flamingo 메뉴에서 해당 글을 볼 수 있다.
<figure class=“wp-block-image aligncenter size-full”></figure>메일을 비활성화 하지 않으면 에러메시지가 자꾸 떠서 메시지는 쌓이는데, 사용자에게는 에러가 발생한 것 처럼 나타난다.
끝.
WordPress – AWS bitnami 재시작 하기
가끔 재시작이 필요한데, 방법을 잘 모르겠다.
SSH 접속해서, 아래 명령을 수행하면 변경 사항을 적용하려면 서버를 다시 시작합니다.
<strong>sudo</strong> /opt/bitnami/ctlscript.sh restart