{"id":105,"date":"2023-03-31T14:01:53","date_gmt":"2023-03-31T12:01:53","guid":{"rendered":"https:\/\/dilyan.be\/?p=105"},"modified":"2023-03-31T14:03:31","modified_gmt":"2023-03-31T12:03:31","slug":"wordpress-on-freebsd-13-1-particularities","status":"publish","type":"post","link":"https:\/\/dilyan.be\/?p=105","title":{"rendered":"WordPress installation on FreeBSD 13.1 particularities"},"content":{"rendered":"<p>There&#8217;s a little specific when installing WordPress from package under FreeBSD 13 and its Apache.<\/p>\n<p>Now, the Apache server coming with the distro is v. 2.4.54 and it is expecting PHP 8.0 (otherwise loading some modules is not working like msqli).<br \/>\nIf you install WordPress from packages it will come with v.6.1 and it has dependencies on PHP 8.1, and then a little drama is starting as Apache can not loading all the needed modules and the error log is full of issues.<br \/>\nIt becomes a nightmare, so the easiest way I have found is to do it by hand (no from packages):<\/p>\n<p>1. De-install WordPress from the FreeBSD repository and PHP 8.1<br \/>\n2. Install PHP 8.0 from packages and add php80-zlib + php80-filter, then enable the service:<br \/>\n# pkg install mod_php80 php80-zlib php80-filter<br \/>\n# cp \/usr\/local\/etc\/php.ini-production \/usr\/local\/etc\/php.ini<br \/>\n# service php-fpm enable<br \/>\n# service php-fpm start<br \/>\n3. You need to add the following either in the httpd.conf, or create a new modules file, or example &#8211;  \/usr\/local\/etc\/apache24\/modules.d\/001_mod-php.conf. Then add the following text:<br \/>\n<ifmodule dir_module=\"\"><br \/>\nDirectoryIndex index.php index.html<br \/>\n<filesmatch \"\\.php$\"=\"\"><br \/>\nSetHandler application\/x-httpd-php<br \/>\n<\/filesmatch><br \/>\n<filesmatch \"\\.phps$\"=\"\"><br \/>\nSetHandler application\/x-httpd-php-source<br \/>\n<\/filesmatch><br \/>\n<\/ifmodule><br \/>\n4. Touch the Apache config file, which in FreeBSD 13.1 is located at \/usr\/local\/etc\/apache24\/httpd.conf<br \/>\na) make sure the following like is uncommented and is there: LoadModule rewrite_module libexec\/apache24\/mod_rewrite.so<br \/>\nb) point the document root to the right directory of the WordPress, in my case it is under: \/usr\/local\/www\/wordpress. So, httpd.conf is having:<br \/>\nDocumentRoot &#8220;\/usr\/local\/www\/wordpress&#8221;<br \/>\n<directory \"=\"\" usr=\"\" local=\"\" www=\"\" wordpress\"=\"\"><br \/>\nOptions Indexes FollowSymLinks<br \/>\nAllowOverride None<br \/>\nRequire all granted<br \/>\n<\/directory><br \/>\n5. Download the latest WordPress version (as of writing this is 6.2) and unzip it in the directory \/usr\/local\/www\/wordpress:<br \/>\n# wget https:\/\/wordpress.org\/latest.tar.gz<br \/>\n# tar -xzvf latest.tar.gz<br \/>\n6. Restart all the services and open the IP address of the configured Apache:<br \/>\n# service apache24 restart<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s a little specific when installing WordPress from package under FreeBSD 13 and its Apache. Now, the Apache server coming with the distro is v. 2.4.54 and it is expecting PHP 8.0 (otherwise loading some modules is not working like msqli). If you install WordPress from packages it will come with v.6.1 and it has [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-bsd"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WordPress installation on FreeBSD 13.1 particularities - dilyan.be<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dilyan.be\/?p=105\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress installation on FreeBSD 13.1 particularities - dilyan.be\" \/>\n<meta property=\"og:description\" content=\"There&#8217;s a little specific when installing WordPress from package under FreeBSD 13 and its Apache. Now, the Apache server coming with the distro is v. 2.4.54 and it is expecting PHP 8.0 (otherwise loading some modules is not working like msqli). If you install WordPress from packages it will come with v.6.1 and it has [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dilyan.be\/?p=105\" \/>\n<meta property=\"og:site_name\" content=\"dilyan.be\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-31T12:01:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-31T12:03:31+00:00\" \/>\n<meta name=\"author\" content=\"dilyan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dilyan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dilyan.be\\\/?p=105#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dilyan.be\\\/?p=105\"},\"author\":{\"name\":\"dilyan\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/#\\\/schema\\\/person\\\/5d995599960773a9e6162910b0fb6c6d\"},\"headline\":\"WordPress installation on FreeBSD 13.1 particularities\",\"datePublished\":\"2023-03-31T12:01:53+00:00\",\"dateModified\":\"2023-03-31T12:03:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dilyan.be\\\/?p=105\"},\"wordCount\":320,\"articleSection\":[\"BSD\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dilyan.be\\\/?p=105\",\"url\":\"https:\\\/\\\/www.dilyan.be\\\/?p=105\",\"name\":\"WordPress installation on FreeBSD 13.1 particularities - dilyan.be\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/dilyan.be\\\/#website\"},\"datePublished\":\"2023-03-31T12:01:53+00:00\",\"dateModified\":\"2023-03-31T12:03:31+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/dilyan.be\\\/#\\\/schema\\\/person\\\/5d995599960773a9e6162910b0fb6c6d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dilyan.be\\\/?p=105#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dilyan.be\\\/?p=105\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dilyan.be\\\/?p=105#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/dilyan.be\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress installation on FreeBSD 13.1 particularities\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/#website\",\"url\":\"https:\\\/\\\/dilyan.be\\\/\",\"name\":\"dilyan.be\",\"description\":\"Dilyan Berkovski&#039;s site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/dilyan.be\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/dilyan.be\\\/#\\\/schema\\\/person\\\/5d995599960773a9e6162910b0fb6c6d\",\"name\":\"dilyan\",\"sameAs\":[\"https:\\\/\\\/dilyan.be\"],\"url\":\"https:\\\/\\\/dilyan.be\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress installation on FreeBSD 13.1 particularities - dilyan.be","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dilyan.be\/?p=105","og_locale":"en_US","og_type":"article","og_title":"WordPress installation on FreeBSD 13.1 particularities - dilyan.be","og_description":"There&#8217;s a little specific when installing WordPress from package under FreeBSD 13 and its Apache. Now, the Apache server coming with the distro is v. 2.4.54 and it is expecting PHP 8.0 (otherwise loading some modules is not working like msqli). If you install WordPress from packages it will come with v.6.1 and it has [&hellip;]","og_url":"https:\/\/www.dilyan.be\/?p=105","og_site_name":"dilyan.be","article_published_time":"2023-03-31T12:01:53+00:00","article_modified_time":"2023-03-31T12:03:31+00:00","author":"dilyan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dilyan","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dilyan.be\/?p=105#article","isPartOf":{"@id":"https:\/\/www.dilyan.be\/?p=105"},"author":{"name":"dilyan","@id":"https:\/\/dilyan.be\/#\/schema\/person\/5d995599960773a9e6162910b0fb6c6d"},"headline":"WordPress installation on FreeBSD 13.1 particularities","datePublished":"2023-03-31T12:01:53+00:00","dateModified":"2023-03-31T12:03:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dilyan.be\/?p=105"},"wordCount":320,"articleSection":["BSD"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dilyan.be\/?p=105","url":"https:\/\/www.dilyan.be\/?p=105","name":"WordPress installation on FreeBSD 13.1 particularities - dilyan.be","isPartOf":{"@id":"https:\/\/dilyan.be\/#website"},"datePublished":"2023-03-31T12:01:53+00:00","dateModified":"2023-03-31T12:03:31+00:00","author":{"@id":"https:\/\/dilyan.be\/#\/schema\/person\/5d995599960773a9e6162910b0fb6c6d"},"breadcrumb":{"@id":"https:\/\/www.dilyan.be\/?p=105#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dilyan.be\/?p=105"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dilyan.be\/?p=105#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dilyan.be\/"},{"@type":"ListItem","position":2,"name":"WordPress installation on FreeBSD 13.1 particularities"}]},{"@type":"WebSite","@id":"https:\/\/dilyan.be\/#website","url":"https:\/\/dilyan.be\/","name":"dilyan.be","description":"Dilyan Berkovski&#039;s site","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dilyan.be\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/dilyan.be\/#\/schema\/person\/5d995599960773a9e6162910b0fb6c6d","name":"dilyan","sameAs":["https:\/\/dilyan.be"],"url":"https:\/\/dilyan.be\/?author=1"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts\/105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=105"}],"version-history":[{"count":2,"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":107,"href":"https:\/\/dilyan.be\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions\/107"}],"wp:attachment":[{"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dilyan.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}